diff --git a/lib/src/message_widget.dart b/lib/src/message_widget.dart index 226e98c0..9834e097 100644 --- a/lib/src/message_widget.dart +++ b/lib/src/message_widget.dart @@ -243,6 +243,12 @@ class _MessageWidgetState extends State { bool get isFailedState => isSendFailed || isUpdateFailed || isDeleteFailed; + bool get showBottomRow => + showThreadReplyIndicator || + showUsername || + showTimeStamp || + showInChannel; + @override Widget build(BuildContext context) { var leftPadding = widget.showUserAvatar != DisplayWidget.gone @@ -267,6 +273,7 @@ class _MessageWidgetState extends State { mainAxisSize: MainAxisSize.min, children: [ Stack( + clipBehavior: Clip.none, alignment: AlignmentDirectional.bottomStart, children: [ Column( @@ -389,39 +396,29 @@ class _MessageWidgetState extends State { ), ), ), - if (isFailedState) - Positioned( - left: widget.reverse ? -6 : null, - right: widget.reverse ? null : -6, - bottom: 0, - child: Container( - decoration: BoxDecoration( - color: Colors.white, - shape: BoxShape.circle, - ), - child: StreamSvgIcon.error( - size: 20, - ), - ), - ), ], ), ), ), ], ), - if (showThreadReplyIndicator || - showUsername || - showTimeStamp || - showInChannel) - SizedBox(height: 20.0), + if (showBottomRow) SizedBox(height: 20.0), ], ), - if (showThreadReplyIndicator || - showUsername || - showTimeStamp || - showInChannel) - _buildBottomRow(leftPadding) + if (showBottomRow) _buildBottomRow(leftPadding), + if (isFailedState) + Positioned( + left: widget.reverse ? -3 : null, + right: widget.reverse ? null : -9, + bottom: showBottomRow ? 20 : 0, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.circle, + ), + child: StreamSvgIcon.error(size: 20), + ), + ), ], ), ],