MessageInput constructor
const
MessageInput({
- Key? key,
- void onMessageSent()?,
- FutureOr<
Message> preMessageSending()?, - Message? parentMessage,
- Message? editMessage,
- double maxHeight = 150,
- TextInputType keyboardType = TextInputType.multiline,
- bool disableAttachments = false,
- Message? initialMessage,
- TextEditingController? textEditingController,
- List<
Widget> actions = const [], - ActionsLocation actionsLocation = ActionsLocation.left,
- Map<
String, AttachmentThumbnailBuilder> ? attachmentThumbnailBuilders, - FocusNode? focusNode,
- Message? quotedMessage,
- VoidCallback? onQuotedMessageCleared,
- SendButtonLocation sendButtonLocation = SendButtonLocation.outside,
- bool autofocus = false,
- bool hideSendAsDm = false,
- Widget? idleSendButton,
- Widget? activeSendButton,
- bool showCommandsButton = true,
- @Deprecated('''Use `userMentionsTileBuilder` instead. Will be removed in future release''') MentionTileBuilder? mentionsTileBuilder,
- UserMentionTileBuilder? userMentionsTileBuilder,
- int maxAttachmentSize = _kDefaultMaxAttachmentSize,
- VideoQuality compressedVideoQuality = VideoQuality.DefaultQuality,
- int compressedVideoFrameRate = 30,
- ErrorListener? onError,
- int attachmentLimit = 10,
- AttachmentLimitExceedListener? onAttachmentLimitExceed,
- ActionButtonBuilder? attachmentButtonBuilder,
- ActionButtonBuilder? commandButtonBuilder,
- List<
OverlayOptions> customOverlays = const [], - bool mentionAllAppUsers = false,
- bool? shouldKeepFocusAfterMessage,
Instantiate a new MessageInput
Implementation
const MessageInput({
Key? key,
this.onMessageSent,
this.preMessageSending,
this.parentMessage,
this.editMessage,
this.maxHeight = 150,
this.keyboardType = TextInputType.multiline,
this.disableAttachments = false,
this.initialMessage,
this.textEditingController,
this.actions = const [],
this.actionsLocation = ActionsLocation.left,
this.attachmentThumbnailBuilders,
this.focusNode,
this.quotedMessage,
this.onQuotedMessageCleared,
this.sendButtonLocation = SendButtonLocation.outside,
this.autofocus = false,
this.hideSendAsDm = false,
this.idleSendButton,
this.activeSendButton,
this.showCommandsButton = true,
@Deprecated('''Use `userMentionsTileBuilder` instead. Will be removed in future release''')
this.mentionsTileBuilder,
this.userMentionsTileBuilder,
this.maxAttachmentSize = _kDefaultMaxAttachmentSize,
this.compressedVideoQuality = VideoQuality.DefaultQuality,
this.compressedVideoFrameRate = 30,
this.onError,
this.attachmentLimit = 10,
this.onAttachmentLimitExceed,
this.attachmentButtonBuilder,
this.commandButtonBuilder,
this.customOverlays = const [],
this.mentionAllAppUsers = false,
this.shouldKeepFocusAfterMessage,
}) : assert(
initialMessage == null || editMessage == null,
"Can't provide both `initialMessage` and `editMessage`",
),
super(key: key);