From 948ee19bda82538804fb26bfc69051c42083d27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20M=C3=BCller?= Date: Sun, 10 Mar 2024 19:14:27 +0100 Subject: [PATCH] Fixed message width for files and limited filename to two lines --- lib/view/pages/talk/components/chatMessage.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/view/pages/talk/components/chatMessage.dart b/lib/view/pages/talk/components/chatMessage.dart index c18d2d1..c45f86c 100644 --- a/lib/view/pages/talk/components/chatMessage.dart +++ b/lib/view/pages/talk/components/chatMessage.dart @@ -39,11 +39,13 @@ class ChatMessage { return CachedNetworkImage( errorWidget: (context, url, error) { return Padding(padding: const EdgeInsets.only(top: 10), child: Row( + mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: [ const Icon(Icons.file_open_outlined, size: 35), const SizedBox(width: 10), - Expanded(child: Text(file!.name, style: const TextStyle(fontWeight: FontWeight.bold))) + Flexible(child: Text(file!.name, maxLines: 2, overflow: TextOverflow.ellipsis, style: const TextStyle(fontWeight: FontWeight.bold))), + const SizedBox(width: 10), ], )); },