[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) _buildBottomRow(leftPadding),
|
||||
if (showBottomRow)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: leftPadding),
|
||||
child: _bottomRow,
|
||||
),
|
||||
if (isFailedState)
|
||||
Positioned(
|
||||
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) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: leftPadding),
|
||||
child: Transform(
|
||||
return Transform(
|
||||
transform: Matrix4.rotationY(widget.reverse ? pi : 0),
|
||||
alignment: Alignment.center,
|
||||
child: Row(
|
||||
@@ -509,12 +511,13 @@ class _MessageWidgetState extends State<MessageWidget> {
|
||||
SizedBox(width: 8.0),
|
||||
Text(
|
||||
'Only visible to you',
|
||||
style: StreamChatTheme.of(context).textTheme.footnote.copyWith(
|
||||
color: StreamChatTheme.of(context).colorTheme.grey),
|
||||
style: StreamChatTheme.of(context)
|
||||
.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();
|
||||
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: leftPadding),
|
||||
child: Flex(
|
||||
return Flex(
|
||||
direction: Axis.horizontal,
|
||||
clipBehavior: Clip.none,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
@@ -606,7 +607,6 @@ class _MessageWidgetState extends State<MessageWidget> {
|
||||
),
|
||||
),
|
||||
].insertBetween(const SizedBox(width: 8.0)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user