fix: Fixed multiple file upload
This commit is contained in:
committed by
Salvatore Giordano
parent
922208224d
commit
a846048ef1
@@ -1203,13 +1203,19 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
? Container()
|
? Container()
|
||||||
: Column(
|
: Column(
|
||||||
children: [
|
children: [
|
||||||
..._attachments
|
LimitedBox(
|
||||||
|
maxHeight: 73.0,
|
||||||
|
child: ListView(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
children: _attachments
|
||||||
.where((e) => e.attachment.type == 'file')
|
.where((e) => e.attachment.type == 'file')
|
||||||
.map(
|
.map(
|
||||||
(e) => FileAttachment(
|
(e) => Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 4.0),
|
||||||
|
child: FileAttachment(
|
||||||
attachment: e.attachment,
|
attachment: e.attachment,
|
||||||
size: Size(
|
size: Size(
|
||||||
MediaQuery.of(context).size.width * 0.6,
|
MediaQuery.of(context).size.width * 0.55,
|
||||||
MediaQuery.of(context).size.height * 0.3,
|
MediaQuery.of(context).size.height * 0.3,
|
||||||
),
|
),
|
||||||
trailing: IconButton(
|
trailing: IconButton(
|
||||||
@@ -1221,8 +1227,11 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
if (_attachments.any((e) => e.attachment.type != 'file'))
|
if (_attachments.any((e) => e.attachment.type != 'file'))
|
||||||
LimitedBox(
|
LimitedBox(
|
||||||
maxHeight: 104.0,
|
maxHeight: 104.0,
|
||||||
|
|||||||
Reference in New Issue
Block a user