From 3577059cc0f89820110e34decc5b616b10711652 Mon Sep 17 00:00:00 2001 From: Hanh Date: Mon, 18 Apr 2022 23:36:24 +0800 Subject: [PATCH] Formatting tweaks --- lib/message_item.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/message_item.dart b/lib/message_item.dart index ecf78fe..164c9cd 100644 --- a/lib/message_item.dart +++ b/lib/message_item.dart @@ -21,7 +21,7 @@ class MessageItem extends StatelessWidget { final textTheme = theme.textTheme; final s = message.incoming ? message.sender : message.recipient; final initial = (s == null || s.isEmpty) ? "?" : s[0]; - final width = MediaQuery.of(context).size.width; + final width = MediaQuery.of(context).size.width - 96; final messageDate = message.timestamp.toLocal(); final now = DateTime.now(); @@ -71,7 +71,7 @@ class MessageItem extends StatelessWidget { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container(width: width * 0.8, + Container(width: width, child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(message.fromto(), style: unreadStyle(textTheme.caption)), Text(dateString) @@ -80,7 +80,7 @@ class MessageItem extends StatelessWidget { height: 5.0, ), Container( - width: width * 0.6, + width: width, child: Text( message.subject, style: unreadStyle(textTheme.titleMedium), overflow: TextOverflow.ellipsis)), @@ -88,7 +88,7 @@ class MessageItem extends StatelessWidget { height: 4.0, ), Container( - width: width * 0.8, + width: width, child: Text( message.body, softWrap: true, maxLines: 5, overflow: TextOverflow.ellipsis,