From ae0999e6ce8c44a3c8267ef09651d7be9d61881b Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 26 Nov 2024 08:54:10 +0100 Subject: [PATCH] chore: Follow up send multiple images --- lib/pages/chat/send_file_dialog.dart | 39 +++++++++++++++------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/lib/pages/chat/send_file_dialog.dart b/lib/pages/chat/send_file_dialog.dart index 0ced2032e..f54f84d27 100644 --- a/lib/pages/chat/send_file_dialog.dart +++ b/lib/pages/chat/send_file_dialog.dart @@ -193,25 +193,28 @@ class SendFileDialogState extends State { padding: const EdgeInsets.only(bottom: 16.0), child: SizedBox( height: 256, - child: ListView.builder( - itemCount: widget.files.length, - scrollDirection: Axis.horizontal, - itemBuilder: (context, i) => Padding( - padding: const EdgeInsets.only(right: 8.0), - child: Material( - borderRadius: BorderRadius.circular( - AppConfig.borderRadius / 2, + child: Center( + child: ListView.builder( + shrinkWrap: true, + itemCount: widget.files.length, + scrollDirection: Axis.horizontal, + itemBuilder: (context, i) => Padding( + padding: const EdgeInsets.only(right: 8.0), + child: Material( + borderRadius: BorderRadius.circular( + AppConfig.borderRadius / 2, + ), + clipBehavior: Clip.hardEdge, + child: kIsWeb + ? Image.network( + widget.files[i].path, + height: 256, + ) + : Image.file( + File(widget.files[i].path), + height: 256, + ), ), - clipBehavior: Clip.hardEdge, - child: kIsWeb - ? Image.network( - widget.files[i].path, - height: 256, - ) - : Image.file( - File(widget.files[i].path), - height: 256, - ), ), ), ),