fi borderradius

This commit is contained in:
Salvatore Giordano
2020-12-03 11:39:38 +01:00
parent 3d92d5fc32
commit d26833aa72
+68 -45
View File
@@ -300,51 +300,74 @@ class _MessageWidgetState extends State<MessageWidget> {
messageTheme: widget.messageTheme, messageTheme: widget.messageTheme,
), ),
) )
: Container( : Material(
decoration: widget.message.attachments shape: widget.shape ??
.where((element) => RoundedRectangleBorder(
element.type == 'file') side: !hasFiles
.isEmpty ? BorderSide.none
? null : widget.borderSide ??
: BoxDecoration( BorderSide(
borderRadius: color: Theme.of(context)
BorderRadius.only( .brightness ==
topLeft: Brightness
Radius.circular(8.0), .dark
topRight: ? Colors.white
Radius.circular(8.0), .withAlpha(24)
bottomRight: : Colors.black
Radius.circular(8.0), .withAlpha(
), 24),
border: hasFiles ),
? Border.fromBorderSide( borderRadius: widget
BorderSide( .borderRadiusGeometry ??
color: BorderRadius.zero,
Color(0xFFE6E6E6), ),
)) color: _getBackgroundColor(),
: null, // decoration: widget.message.attachments
color: hasFiles // .where((element) =>
? (user.id == // element.type == 'file')
widget.message // .isEmpty
.user.id // ? null
? Color(0xFFE6E6E6) // : BoxDecoration(
: Colors.white) // borderRadius:
: Colors.transparent, // BorderRadius.only(
), // topLeft:
padding: EdgeInsets.all( // Radius.circular(8.0),
hasFiles ? 2.0 : 0.0), // topRight:
child: Column( // Radius.circular(8.0),
crossAxisAlignment: // bottomRight:
CrossAxisAlignment.start, // Radius.circular(8.0),
mainAxisSize: MainAxisSize.min, // ),
children: <Widget>[ // border: hasFiles
..._parseAttachments(context), // ? Border.fromBorderSide(
if (widget.message.text // BorderSide(
.trim() // color:
.isNotEmpty && // Color(0xFFE6E6E6),
!isGiphy) // ))
_buildTextBubble(context), // : null,
], // color: hasFiles
// ? (user.id ==
// widget.message
// .user.id
// ? Color(0xFFE6E6E6)
// : Colors.white)
// : Colors.transparent,
// ),
child: Padding(
padding: EdgeInsets.all(
hasFiles ? 2.0 : 0.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
..._parseAttachments(context),
if (widget.message.text
.trim()
.isNotEmpty &&
!isGiphy)
_buildTextBubble(context),
],
),
), ),
), ),
), ),