Skip to content

Commit b4a4557

Browse files
committed
msglist: Update layout of messages
Adjusted padding/spacing as per Figma design and moved widgets around such that the gutters to the left and right of message contents are ready for future decorative elements.
1 parent c16f1ba commit b4a4557

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

lib/widgets/message_list.dart

Lines changed: 19 additions & 16 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,
899+
child: Column(
900+
children: [
901+
if (senderRow != null) senderRow,
902+
Padding(
903+
padding: const EdgeInsets.symmetric(vertical: 4),
904+
child: Row(
905+
crossAxisAlignment: CrossAxisAlignment.start,
905906
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!)
907+
const SizedBox(width: 16),
908+
Expanded(
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),
914917
])),
915-
])));
918+
]));
916919
}
917920
}
918921

0 commit comments

Comments
 (0)