[Message Widget] fix error icon stack position
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
+22
-25
@@ -243,6 +243,12 @@ class _MessageWidgetState extends State<MessageWidget> {
|
|||||||
|
|
||||||
bool get isFailedState => isSendFailed || isUpdateFailed || isDeleteFailed;
|
bool get isFailedState => isSendFailed || isUpdateFailed || isDeleteFailed;
|
||||||
|
|
||||||
|
bool get showBottomRow =>
|
||||||
|
showThreadReplyIndicator ||
|
||||||
|
showUsername ||
|
||||||
|
showTimeStamp ||
|
||||||
|
showInChannel;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var leftPadding = widget.showUserAvatar != DisplayWidget.gone
|
var leftPadding = widget.showUserAvatar != DisplayWidget.gone
|
||||||
@@ -267,6 +273,7 @@ class _MessageWidgetState extends State<MessageWidget> {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Stack(
|
Stack(
|
||||||
|
clipBehavior: Clip.none,
|
||||||
alignment: AlignmentDirectional.bottomStart,
|
alignment: AlignmentDirectional.bottomStart,
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
@@ -389,39 +396,29 @@ class _MessageWidgetState extends State<MessageWidget> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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 ||
|
if (showBottomRow) SizedBox(height: 20.0),
|
||||||
showUsername ||
|
|
||||||
showTimeStamp ||
|
|
||||||
showInChannel)
|
|
||||||
SizedBox(height: 20.0),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (showThreadReplyIndicator ||
|
if (showBottomRow) _buildBottomRow(leftPadding),
|
||||||
showUsername ||
|
if (isFailedState)
|
||||||
showTimeStamp ||
|
Positioned(
|
||||||
showInChannel)
|
left: widget.reverse ? -3 : null,
|
||||||
_buildBottomRow(leftPadding)
|
right: widget.reverse ? null : -9,
|
||||||
|
bottom: showBottomRow ? 20 : 0,
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
|
child: StreamSvgIcon.error(size: 20),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user