[MessageWidget] Move bottomRow padding to upper layer
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
+12
-12
@@ -449,7 +449,11 @@ class _MessageWidgetState extends State<MessageWidget> {
|
|||||||
if (showBottomRow) SizedBox(height: 20.0),
|
if (showBottomRow) SizedBox(height: 20.0),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (showBottomRow) _buildBottomRow(leftPadding),
|
if (showBottomRow)
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: leftPadding),
|
||||||
|
child: _bottomRow,
|
||||||
|
),
|
||||||
if (isFailedState)
|
if (isFailedState)
|
||||||
Positioned(
|
Positioned(
|
||||||
left: widget.reverse ? -3 : null,
|
left: widget.reverse ? -3 : null,
|
||||||
@@ -492,11 +496,9 @@ class _MessageWidgetState extends State<MessageWidget> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBottomRow(double leftPadding) {
|
Widget get _bottomRow {
|
||||||
if (widget.message.isDeleted) {
|
if (widget.message.isDeleted) {
|
||||||
return Padding(
|
return Transform(
|
||||||
padding: EdgeInsets.only(left: leftPadding),
|
|
||||||
child: Transform(
|
|
||||||
transform: Matrix4.rotationY(widget.reverse ? pi : 0),
|
transform: Matrix4.rotationY(widget.reverse ? pi : 0),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Row(
|
child: Row(
|
||||||
@@ -509,12 +511,13 @@ class _MessageWidgetState extends State<MessageWidget> {
|
|||||||
SizedBox(width: 8.0),
|
SizedBox(width: 8.0),
|
||||||
Text(
|
Text(
|
||||||
'Only visible to you',
|
'Only visible to you',
|
||||||
style: StreamChatTheme.of(context).textTheme.footnote.copyWith(
|
style: StreamChatTheme.of(context)
|
||||||
color: StreamChatTheme.of(context).colorTheme.grey),
|
.textTheme
|
||||||
|
.footnote
|
||||||
|
.copyWith(color: StreamChatTheme.of(context).colorTheme.grey),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -573,9 +576,7 @@ class _MessageWidgetState extends State<MessageWidget> {
|
|||||||
|
|
||||||
if (widget.reverse) children = children.reversed.toList();
|
if (widget.reverse) children = children.reversed.toList();
|
||||||
|
|
||||||
return Padding(
|
return Flex(
|
||||||
padding: EdgeInsets.only(left: leftPadding),
|
|
||||||
child: Flex(
|
|
||||||
direction: Axis.horizontal,
|
direction: Axis.horizontal,
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
@@ -606,7 +607,6 @@ class _MessageWidgetState extends State<MessageWidget> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
].insertBetween(const SizedBox(width: 8.0)),
|
].insertBetween(const SizedBox(width: 8.0)),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user