MessageInput constructor

const MessageInput({
  1. Key? key,
  2. void onMessageSent(
    1. Message
    )?,
  3. FutureOr<Message> preMessageSending(
    1. Message
    )?,
  4. Message? parentMessage,
  5. Message? editMessage,
  6. double maxHeight = 150,
  7. TextInputType keyboardType = TextInputType.multiline,
  8. bool disableAttachments = false,
  9. Message? initialMessage,
  10. TextEditingController? textEditingController,
  11. List<Widget> actions = const [],
  12. ActionsLocation actionsLocation = ActionsLocation.left,
  13. Map<String, AttachmentThumbnailBuilder>? attachmentThumbnailBuilders,
  14. FocusNode? focusNode,
  15. Message? quotedMessage,
  16. VoidCallback? onQuotedMessageCleared,
  17. SendButtonLocation sendButtonLocation = SendButtonLocation.outside,
  18. bool autofocus = false,
  19. bool hideSendAsDm = false,
  20. Widget? idleSendButton,
  21. Widget? activeSendButton,
  22. bool showCommandsButton = true,
  23. @Deprecated('''Use `userMentionsTileBuilder` instead. Will be removed in future release''') MentionTileBuilder? mentionsTileBuilder,
  24. UserMentionTileBuilder? userMentionsTileBuilder,
  25. int maxAttachmentSize = _kDefaultMaxAttachmentSize,
  26. VideoQuality compressedVideoQuality = VideoQuality.DefaultQuality,
  27. int compressedVideoFrameRate = 30,
  28. ErrorListener? onError,
  29. int attachmentLimit = 10,
  30. AttachmentLimitExceedListener? onAttachmentLimitExceed,
  31. ActionButtonBuilder? attachmentButtonBuilder,
  32. ActionButtonBuilder? commandButtonBuilder,
  33. List<OverlayOptions> customOverlays = const [],
  34. bool mentionAllAppUsers = false,
  35. 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);