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 _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
|
/// Inactive state
|
||||||
///
|
///
|
||||||
@@ -188,7 +189,7 @@ class MessageInput extends StatefulWidget {
|
|||||||
@Deprecated('''Use `userMentionsTileBuilder` instead. Will be removed in future release''')
|
@Deprecated('''Use `userMentionsTileBuilder` instead. Will be removed in future release''')
|
||||||
this.mentionsTileBuilder,
|
this.mentionsTileBuilder,
|
||||||
this.userMentionsTileBuilder,
|
this.userMentionsTileBuilder,
|
||||||
this.maxAttachmentSize = _kDefaultMaxAttachmentSize,
|
this.maxAttachmentSize = kDefaultMaxAttachmentSize,
|
||||||
this.onError,
|
this.onError,
|
||||||
this.attachmentLimit = 10,
|
this.attachmentLimit = 10,
|
||||||
this.onAttachmentLimitExceed,
|
this.onAttachmentLimitExceed,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class StreamAttachmentPicker extends StatefulWidget {
|
|||||||
this.pickerSize = 360.0,
|
this.pickerSize = 360.0,
|
||||||
this.attachmentLimit = 10,
|
this.attachmentLimit = 10,
|
||||||
this.onAttachmentLimitExceeded,
|
this.onAttachmentLimitExceeded,
|
||||||
this.maxAttachmentSize = 20971520,
|
this.maxAttachmentSize = kDefaultMaxAttachmentSize,
|
||||||
this.onError,
|
this.onError,
|
||||||
this.allowedAttachmentTypes = const [
|
this.allowedAttachmentTypes = const [
|
||||||
DefaultAttachmentTypes.image,
|
DefaultAttachmentTypes.image,
|
||||||
|
|||||||
@@ -128,7 +128,8 @@ enum SendButtonLocation {
|
|||||||
|
|
||||||
const _kMinMediaPickerSize = 360.0;
|
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:
|
/// Inactive state:
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user