feat: Added file icons, added new file attachment and bg
This commit is contained in:
committed by
Salvatore Giordano
parent
c145ed0971
commit
895497290c
@@ -1562,12 +1562,24 @@ class MessageInputState extends State<MessageInput> {
|
||||
attachmentType = mimeType.type;
|
||||
}
|
||||
|
||||
Map<String, dynamic> extraDataMap = {};
|
||||
|
||||
if (mimeType?.subtype != null) {
|
||||
extraDataMap['mime_type'] = mimeType.subtype.toLowerCase();
|
||||
}
|
||||
|
||||
if (file.size != null) {
|
||||
extraDataMap['file_size'] = file.size;
|
||||
}
|
||||
|
||||
final channel = StreamChannel.of(context).channel;
|
||||
final attachment = _SendingAttachment(
|
||||
file: file,
|
||||
attachment: Attachment(
|
||||
localUri: file.path != null ? Uri.parse(file.path) : null,
|
||||
type: attachmentType,
|
||||
extraData: extraDataMap.isNotEmpty ? extraDataMap : null,
|
||||
title: file.name ?? 'File',
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user