Skip to content

Commit 4b7da53

Browse files
committed
msglist: Update padding/spacing in message layout
1 parent c16f1ba commit 4b7da53

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

lib/widgets/message_list.dart

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ class MessageWithPossibleSender extends StatelessWidget {
855855

856856
final Widget? senderRow = item.showSender
857857
? Padding(
858-
padding: const EdgeInsets.fromLTRB(3, 6, 11, 0),
858+
padding: const EdgeInsets.only(top: 6, left: 16, right: 16),
859859
child: Row(
860860
mainAxisAlignment: MainAxisAlignment.spaceBetween,
861861
crossAxisAlignment: CrossAxisAlignment.baseline,
@@ -896,23 +896,26 @@ class MessageWithPossibleSender extends StatelessWidget {
896896
return GestureDetector(
897897
behavior: HitTestBehavior.translucent,
898898
onLongPress: () => showMessageActionSheet(context: context, message: message),
899-
child: Padding(
900-
padding: const EdgeInsets.only(top: 2, bottom: 3, left: 8, right: 8),
901-
child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
902-
Expanded(
903-
child: Column(
904-
crossAxisAlignment: CrossAxisAlignment.stretch,
905-
children: [
906-
if (senderRow != null) ...[
907-
const SizedBox(height: 3),
908-
senderRow,
909-
const SizedBox(height: 4),
910-
],
911-
MessageContent(message: message, content: item.content),
912-
if ((message.reactions?.total ?? 0) > 0)
913-
ReactionChipsList(messageId: message.id, reactions: message.reactions!)
914-
])),
915-
])));
899+
child: Column(
900+
children: [
901+
if (senderRow != null) senderRow,
902+
Row(
903+
crossAxisAlignment: CrossAxisAlignment.start,
904+
children: [
905+
const SizedBox(width: 16),
906+
Expanded(
907+
child: Padding(
908+
padding: const EdgeInsets.symmetric(vertical: 4),
909+
child: Column(
910+
crossAxisAlignment: CrossAxisAlignment.stretch,
911+
children: [
912+
MessageContent(message: message, content: item.content),
913+
if ((message.reactions?.total ?? 0) > 0)
914+
ReactionChipsList(messageId: message.id, reactions: message.reactions!)
915+
]))),
916+
const SizedBox(width: 16),
917+
]),
918+
]));
916919
}
917920
}
918921

0 commit comments

Comments
 (0)