Fixed message width for files and limited filename to two lines

This commit is contained in:
Elias Müller 2024-03-10 19:14:27 +01:00
parent 6c3b99ffa4
commit 948ee19bda

View File

@ -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),
],
));
},