Line data Source code
1 : import 'package:cwtch/cwtch_icons_icons.dart'; 2 : import 'package:flutter/material.dart'; 3 : import 'package:cwtch/l10n/app_localizations.dart'; 4 : 5 0 : final Color malformedColor = Color(0xFFE85DA1); 6 : 7 : // MalformedBubble is displayed in the case of a malformed message 8 : class MalformedBubble extends StatefulWidget { 9 0 : @override 10 0 : MalformedBubbleState createState() => MalformedBubbleState(); 11 : } 12 : 13 : class MalformedBubbleState extends State<MalformedBubble> { 14 0 : @override 15 : Widget build(BuildContext context) { 16 0 : return Container( 17 0 : decoration: BoxDecoration( 18 0 : color: malformedColor, 19 0 : border: Border.all(color: malformedColor, width: 1), 20 0 : borderRadius: BorderRadius.only(topLeft: Radius.zero, topRight: Radius.zero, bottomLeft: Radius.zero, bottomRight: Radius.zero), 21 : ), 22 0 : child: FittedBox( 23 : fit: BoxFit.contain, 24 0 : child: Center( 25 : widthFactor: 1.0, 26 0 : child: Padding( 27 0 : padding: EdgeInsets.all(9.0), 28 0 : child: Row( 29 : mainAxisSize: MainAxisSize.min, 30 0 : children: [ 31 0 : Center( 32 : widthFactor: 1, 33 0 : child: Padding(padding: EdgeInsets.all(4), child: Icon(CwtchIcons.favorite_black_24dp_broken, size: 24)), 34 : ), 35 0 : Center( 36 : widthFactor: 1.0, 37 0 : child: Text(AppLocalizations.of(context)!.malformedMessage, overflow: TextOverflow.ellipsis, textWidthBasis: TextWidthBasis.longestLine), 38 : ), 39 : ], 40 : ), 41 : ), 42 : ), 43 : ), 44 : ); 45 : } 46 : }