chat_ui/src/message_list/bloc/bloc library
BLoC for message list module
All logic (BLoC, Events, State) lives here in chat_ui.
Classes
- AddReaction
- Add a reaction to a message
- AnimatedMessageListBloc
- BLoC for managing animated message list state
- AnimatedMessageListState
- State for the animated message list BLoC (legacy compatibility)
- DeliveryReceiptReceived
- Handle delivery receipt from SDK listener
- ForceEmptyState
- Force the message list into empty state without loading messages. Used for AI users with no active thread (fresh chat).
- InsertAllMessages
- Insert multiple messages into the list
- InsertMessage
- Insert a single message into the list
- JumpToMessage
- Jump to a specific message by ID
- LoadFromUnread
- Load messages starting from unread position
- LoadMessages
- Load initial messages for a conversation
- LoadNewerMessages
- Load newer messages (pagination - scroll down)
- LoadOlderMessages
- Load older messages (pagination - scroll up)
- MarkMessageAsRead
- Mark a message as read
- MarkMessageAsUnread
- Mark a message as unread
- MessageDeleted
- Handle message deletion from SDK listener
- MessageEdited
- Handle message edit from SDK listener
- MessageListBloc
- BLoC for managing message list state with Clean Architecture
- MessageListBlocAdapter
- Adapter that wraps MessageListBloc to implement CometChatMessageListControllerProtocol.
- MessageListEvent
- Base class for all message list events Uses Equatable for proper event comparison in BLoC
- MessageListState
- State for the message list BLoC (Clean Architecture)
- MessageReceived
- Handle incoming message from SDK listener
- MessageSentByUser
- Handle message sent by the logged-in user (from UI events)
- ReactionAddedFromSDK
- Handle reaction added from SDK listener
- ReactionRemovedFromSDK
- Handle reaction removed from SDK listener
- ReadReceiptReceived
- Handle read receipt from SDK listener
- RefreshMessages
- Refresh the message list
- RemoveMessage
- Remove a message from the list
- RemoveReaction
- Remove a reaction from a message
- ResetUnreadState
- Reset unread state
- SetActiveConversation
- Set active conversation (for unread count management)
- SetHasMoreNewer
- Set whether there are more newer messages to load
- SetHasMoreOlder
- Set whether there are more older messages to load
- SetLoadingNewer
- Set the loading newer messages state
- SetLoadingOlder
- Set the loading older messages state
- SetMessages
- Replace the entire message list
- SyncMessages
- Silently sync messages missed while app was in background or disconnected
- UpdateMessage
- Update an existing message in the list
Enums
- MessageListStatus
- Status enum for message list
- MessageReceiptStatus
- Enum representing message receipt status for ValueNotifier updates
Typedefs
-
ScrollToIndexCallback
= Future<
bool> Function(int index, {double alignment, Duration duration}) - Callback type for scrolling to a specific index Returns true if the scroll was initiated, false if the list wasn't ready
-
ScrollToMessageCallback
= Future<
bool> Function(int messageId, {double alignment, Duration duration}) - Callback type for scrolling to a specific message by ID Returns true if the scroll was initiated, false if the list wasn't ready