ChatController class base

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 ValueListenable for SuggestionList widget's ValueListenableBuilder. Use this to listen when suggestion gets added
no setter
otherUsers List<ChatUser>
Represents list of chat users
no setter
otherUsersMap Map<String, ChatUser>
no setter
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
Indicates whether the typing indicator is displayed. Returns true if the typing indicator is shown, otherwise false
no setter
typingIndicatorNotifier ValueListenable<bool>
TypingIndicator as ValueListenable 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
updateOtherUser(ChatUser chatUser) → void
Function for updating the details of an existing user (other users).

Operators

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