This commit is contained in:
Deven Joshi
2021-08-23 20:46:14 +05:30
parent 55853c2aca
commit a37c92cdbf
@@ -1163,28 +1163,29 @@ class MessageInputState extends State<MessageInput> {
), ),
), ),
), ),
Expanded( if (_openFilePickerSection)
child: DecoratedBox( Expanded(
decoration: BoxDecoration( child: DecoratedBox(
color: _streamChatTheme.colorTheme.barsBg, decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), color: _streamChatTheme.colorTheme.barsBg,
), borderRadius: BorderRadius.circular(8),
child: _PickerWidget( ),
filePickerIndex: _filePickerIndex, child: _PickerWidget(
streamChatTheme: _streamChatTheme, filePickerIndex: _filePickerIndex,
containsFile: _attachmentContainsFile, streamChatTheme: _streamChatTheme,
selectedMedias: _attachments.keys.toList(), containsFile: _attachmentContainsFile,
onAddMoreFilesClick: pickFile, selectedMedias: _attachments.keys.toList(),
onMediaSelected: (media) { onAddMoreFilesClick: pickFile,
if (_attachments.containsKey(media.id)) { onMediaSelected: (media) {
setState(() => _attachments.remove(media.id)); if (_attachments.containsKey(media.id)) {
} else { setState(() => _attachments.remove(media.id));
_addAssetAttachment(media); } else {
} _addAssetAttachment(media);
}, }
},
),
), ),
), ),
),
], ],
), ),
), ),