fi borderradius

This commit is contained in:
Salvatore Giordano
2020-12-03 11:39:38 +01:00
parent 3d92d5fc32
commit d26833aa72
+52 -29
View File
@@ -300,37 +300,59 @@ 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(
borderRadius:
BorderRadius.only(
topLeft:
Radius.circular(8.0),
topRight:
Radius.circular(8.0),
bottomRight:
Radius.circular(8.0),
),
border: hasFiles
? Border.fromBorderSide(
BorderSide( BorderSide(
color: color: Theme.of(context)
Color(0xFFE6E6E6), .brightness ==
)) Brightness
: null, .dark
color: hasFiles ? Colors.white
? (user.id == .withAlpha(24)
widget.message : Colors.black
.user.id .withAlpha(
? Color(0xFFE6E6E6) 24),
: Colors.white)
: Colors.transparent,
), ),
borderRadius: widget
.borderRadiusGeometry ??
BorderRadius.zero,
),
color: _getBackgroundColor(),
// decoration: widget.message.attachments
// .where((element) =>
// element.type == 'file')
// .isEmpty
// ? null
// : BoxDecoration(
// borderRadius:
// BorderRadius.only(
// topLeft:
// Radius.circular(8.0),
// topRight:
// Radius.circular(8.0),
// bottomRight:
// Radius.circular(8.0),
// ),
// border: hasFiles
// ? Border.fromBorderSide(
// BorderSide(
// color:
// Color(0xFFE6E6E6),
// ))
// : null,
// color: hasFiles
// ? (user.id ==
// widget.message
// .user.id
// ? Color(0xFFE6E6E6)
// : Colors.white)
// : Colors.transparent,
// ),
child: Padding(
padding: EdgeInsets.all( padding: EdgeInsets.all(
hasFiles ? 2.0 : 0.0), hasFiles ? 2.0 : 0.0),
child: Column( child: Column(
@@ -348,6 +370,7 @@ class _MessageWidgetState extends State<MessageWidget> {
), ),
), ),
), ),
),
if (widget.showReactionPickerIndicator) if (widget.showReactionPickerIndicator)
Positioned( Positioned(
right: 0, right: 0,