From 0e857a8938d64a2b485c6b40798b55e0db87b985 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Wed, 20 Jan 2021 17:34:57 +0530 Subject: [PATCH 1/2] fix: Added file size fix --- packages/flutter_widgets/lib/src/message_input.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_widgets/lib/src/message_input.dart b/packages/flutter_widgets/lib/src/message_input.dart index 856fac1c..01ae3d3a 100644 --- a/packages/flutter_widgets/lib/src/message_input.dart +++ b/packages/flutter_widgets/lib/src/message_input.dart @@ -1998,7 +1998,7 @@ class MessageInputState extends State { _attachments.add(attachment); }); - if (file.size > _kMaxAttachmentSize) { + if (file.size / 1024 > _kMaxAttachmentSize) { if (attachmentType == 'video') { final mediaInfo = await CompressVideoService.compressVideo(file.path); file = PlatformFile( From aeaef4babdc461d6c9fc83958f880a94bd9529b1 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 20 Jan 2021 15:35:43 +0100 Subject: [PATCH 2/2] fix file attachment borer --- packages/flutter_widgets/lib/src/file_attachment.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/flutter_widgets/lib/src/file_attachment.dart b/packages/flutter_widgets/lib/src/file_attachment.dart index 3fa8c469..8e3ef4d6 100644 --- a/packages/flutter_widgets/lib/src/file_attachment.dart +++ b/packages/flutter_widgets/lib/src/file_attachment.dart @@ -62,7 +62,13 @@ class _FileAttachmentState extends State { child: Container( width: widget.size?.width ?? 100, height: 56.0, - color: StreamChatTheme.of(context).colorTheme.white, + decoration: BoxDecoration( + color: StreamChatTheme.of(context).colorTheme.white, + borderRadius: BorderRadius.circular(12), + border: Border.all( + color: StreamChatTheme.of(context).colorTheme.greyWhisper, + ), + ), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [