fix(ui): export kDefaultMaxAttachmentSize and use it in StreamAttachmentPicker default, also increase it to 100Mb
This commit is contained in:
@@ -110,7 +110,8 @@ enum SendButtonLocation {
|
||||
|
||||
const _kMinMediaPickerSize = 360.0;
|
||||
|
||||
const _kDefaultMaxAttachmentSize = 20971520; // 20MB in Bytes
|
||||
/// Default maximum size for media attachments.
|
||||
const kDefaultMaxAttachmentSize = 1024 * 1024 * 100; // 100MB in Bytes
|
||||
|
||||
/// Inactive state
|
||||
///
|
||||
@@ -188,7 +189,7 @@ class MessageInput extends StatefulWidget {
|
||||
@Deprecated('''Use `userMentionsTileBuilder` instead. Will be removed in future release''')
|
||||
this.mentionsTileBuilder,
|
||||
this.userMentionsTileBuilder,
|
||||
this.maxAttachmentSize = _kDefaultMaxAttachmentSize,
|
||||
this.maxAttachmentSize = kDefaultMaxAttachmentSize,
|
||||
this.onError,
|
||||
this.attachmentLimit = 10,
|
||||
this.onAttachmentLimitExceed,
|
||||
|
||||
@@ -32,7 +32,7 @@ class StreamAttachmentPicker extends StatefulWidget {
|
||||
this.pickerSize = 360.0,
|
||||
this.attachmentLimit = 10,
|
||||
this.onAttachmentLimitExceeded,
|
||||
this.maxAttachmentSize = 20971520,
|
||||
this.maxAttachmentSize = kDefaultMaxAttachmentSize,
|
||||
this.onError,
|
||||
this.allowedAttachmentTypes = const [
|
||||
DefaultAttachmentTypes.image,
|
||||
|
||||
@@ -128,7 +128,8 @@ enum SendButtonLocation {
|
||||
|
||||
const _kMinMediaPickerSize = 360.0;
|
||||
|
||||
const _kDefaultMaxAttachmentSize = 20971520; // 20MB in Bytes
|
||||
/// Default maximum size for media attachments.
|
||||
const kDefaultMaxAttachmentSize = 1024 * 1024 * 100; // 100MB in Bytes
|
||||
|
||||
/// Inactive state:
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user