ChatController class

Constructors

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

Properties

chatUsers List<ChatUser>
Represents list of chat users
getter/setter pair
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
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 ValueNotifier<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.
dispose() → void
Used to dispose stream.
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
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