MessageInputProvider class

Stores message input mode, text draft, reference message, voice state, and mentions.

Mixed-in types

Constructors

MessageInputProvider()

Properties

currentEmojiPage int
Current emoji page index.
no setter
draft String
Current text draft.
no setter
emojiPages List<List<String>>
Emoji pages prepared for the emoji panel.
no setter
hasDraft bool
Whether the draft contains non-whitespace text.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
hasMultipleEmojiPages bool
Whether the emoji panel has more than one page.
no setter
hasReferenceMessage bool
Whether a reference message is active.
no setter
isVoiceCanceling bool
Whether the active voice recording is being canceled.
no setter
isVoiceRecording bool
Whether a voice recording interaction is active.
no setter
mentions List<MessageInputMention>
Mentions retained in the current draft.
no setter
mentionUserIds List<String>
User ids extracted from retained mentions.
no setter
mode MessageInputMode
Current input mode.
no setter
referenceMessage Message?
Message currently referenced by the input.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
voiceRecordingState MessageInputVoiceRecordingState
Current voice recording state.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addMention(String userId, String displayName) → void
Adds a mention to the current draft state.
clearDraft() → void
Clears the current draft.
clearMentions() → void
Clears all retained mentions.
clearReferenceMessage() → void
Clears the active reference message.
clearVoiceRecordingState() → void
Resets voice recording state to idle.
dispose() → void
Discards any resources used by the object.
inherited
loadEmojis({int? rowCount, int? columnCount, List<String>? customEmojis}) Future<void>
Loads custom or bundled emoji pages.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
resetForChannel({String draft = '', MessageInputMode mode = MessageInputMode.initial}) → void
Resets input state for a new channel and notifies listeners.
resetForChannelSilently({String draft = '', MessageInputMode mode = MessageInputMode.initial}) → void
Resets input state for a new channel without notifying listeners.
setCurrentEmojiPage(int page) → void
Sets the current emoji page index.
setMode(MessageInputMode mode) → void
Updates the current input mode and notifies listeners.
setModeSilently(MessageInputMode mode) → void
Updates the current input mode without notifying listeners.
setReferenceMessage(Message? message) → void
Sets the active reference message.
setVoiceRecordingState(MessageInputVoiceRecordingState state) → void
Updates voice recording state.
toggleMode(MessageInputMode mode) → void
Toggles mode, returning to text mode when already selected.
toString() String
A string representation of this object.
inherited
updateDraft(String value) → void
Updates the text draft and prunes mentions no longer present.
updateDraftSilently(String value) → void
Updates the text draft without notifying listeners.

Operators

operator ==(Object other) bool
The equality operator.
inherited