Skip to content

Commit ae0999e

Browse files
committed
chore: Follow up send multiple images
1 parent 363eabb commit ae0999e

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

lib/pages/chat/send_file_dialog.dart

+21-18
Original file line numberDiff line numberDiff line change
@@ -193,25 +193,28 @@ class SendFileDialogState extends State<SendFileDialog> {
193193
padding: const EdgeInsets.only(bottom: 16.0),
194194
child: SizedBox(
195195
height: 256,
196-
child: ListView.builder(
197-
itemCount: widget.files.length,
198-
scrollDirection: Axis.horizontal,
199-
itemBuilder: (context, i) => Padding(
200-
padding: const EdgeInsets.only(right: 8.0),
201-
child: Material(
202-
borderRadius: BorderRadius.circular(
203-
AppConfig.borderRadius / 2,
196+
child: Center(
197+
child: ListView.builder(
198+
shrinkWrap: true,
199+
itemCount: widget.files.length,
200+
scrollDirection: Axis.horizontal,
201+
itemBuilder: (context, i) => Padding(
202+
padding: const EdgeInsets.only(right: 8.0),
203+
child: Material(
204+
borderRadius: BorderRadius.circular(
205+
AppConfig.borderRadius / 2,
206+
),
207+
clipBehavior: Clip.hardEdge,
208+
child: kIsWeb
209+
? Image.network(
210+
widget.files[i].path,
211+
height: 256,
212+
)
213+
: Image.file(
214+
File(widget.files[i].path),
215+
height: 256,
216+
),
204217
),
205-
clipBehavior: Clip.hardEdge,
206-
child: kIsWeb
207-
? Image.network(
208-
widget.files[i].path,
209-
height: 256,
210-
)
211-
: Image.file(
212-
File(widget.files[i].path),
213-
height: 256,
214-
),
215218
),
216219
),
217220
),

0 commit comments

Comments
 (0)