From 8da9ef06ff8bfcb6aedc3985e91f5d03f87f4480 Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 25 Feb 2025 14:19:07 +0100 Subject: [PATCH] chore: Follow up send file dialog design --- lib/pages/chat/send_file_dialog.dart | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/pages/chat/send_file_dialog.dart b/lib/pages/chat/send_file_dialog.dart index 4e4faadd2..9928f1345 100644 --- a/lib/pages/chat/send_file_dialog.dart +++ b/lib/pages/chat/send_file_dialog.dart @@ -202,8 +202,8 @@ class SendFileDialogState extends State { title: Text(sendStr), content: SizedBox( width: 256, - child: Column( - mainAxisSize: MainAxisSize.min, + child: ListView( + shrinkWrap: true, children: [ const SizedBox(height: 12), if (uniqueFileType == 'image') @@ -222,6 +222,7 @@ class SendFileDialogState extends State { borderRadius: BorderRadius.circular( AppConfig.borderRadius / 2, ), + color: Colors.black, clipBehavior: Clip.hardEdge, child: FutureBuilder( future: widget.files[i].readAsBytes(), @@ -253,6 +254,9 @@ class SendFileDialogState extends State { return Image.memory( bytes, height: 256, + width: + widget.files.length == 1 ? 256 : null, + fit: BoxFit.contain, errorBuilder: (context, e, s) { Logs().w('Unable to preview image', e, s); return const Center( @@ -315,7 +319,7 @@ class SendFileDialogState extends State { ), if (widget.files.length == 1) Padding( - padding: const EdgeInsets.symmetric(vertical: 12.0), + padding: const EdgeInsets.only(bottom: 8.0), child: DialogTextField( controller: _labelTextController, labelText: L10n.of(context).optionalMessage,