From 0e857a8938d64a2b485c6b40798b55e0db87b985 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Wed, 20 Jan 2021 17:34:57 +0530 Subject: [PATCH] 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(