ChatController class

Constructors

ChatController({required List<Message> initialMessageList, required ScrollController scrollController, required List<ChatUser> otherUsers, required ChatUser currentUser})

Properties

currentUser ChatUser
Provides current user which is sending messages.
final
hashCode int
The hash code for this object.
no setterinherited
initialMessageList List<Message>
Represents initial message list in chat which can be add by user.
getter/setter pair
messageStreamController StreamController<List<Message>>
Represents message stream of chat
getter/setter pair
newSuggestions ValueListenable<List<SuggestionItemData>>
newSuggestions as ValueNotifier for SuggestionList widget's ValueListenableBuilder. Use this to listen when suggestion gets added
no setter
otherUsers List<ChatUser>
Represents list of chat users
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController
getter/setter pair
setTypingIndicator bool
Setter for changing values of typingIndicator
no getter
showTypingIndicator bool
Getter for typingIndicator value instead of accessing _showTypingIndicator.value for better accessibility.
no setter
typingIndicatorNotifier ValueListenable<bool>
TypingIndicator as ValueNotifier for GroupedChatList widget's typingIndicator ValueListenableBuilder. Use this for listening typing indicators
no setter

Methods

addMessage(Message message) → void
Used to add message in message list.
addReplySuggestions(List<SuggestionItemData> suggestions) → void
Used to add reply suggestions.
dispose() → void
Used to dispose ValueNotifiers and Streams.
getUserFromId(String userId) ChatUser
Function for getting ChatUser object from user id
loadMoreData(List<Message> messageList) → void
Function for loading data while pagination.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeReplySuggestions() → void
Used to remove reply suggestions.
scrollToLastMessage() → void
Function to scroll to last messages in chat view
setReaction({required String emoji, required String messageId, required String userId}) → void
Function for setting reaction on specific chat bubble
toString() String
A string representation of this object.
inherited

Operators

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