Skip to main content
Threaded messages let users create sub-conversations by replying to specific messages. This reduces clutter and keeps discussions focused. Before starting, complete the Getting Started guide.

Components


Integration Steps

1. Thread Trigger in Messages

Wire the onThreadRepliesClick callback on CometChatMessageList. When a user clicks the thread reply icon on any message, this fires with the parent message object. File: messages.dart

2. Thread Screen Widget

Create the thread screen with header, message list, and composer. The CometChatThread widget handles the complete thread UI. File: cometchat_thread.dart

3. Thread Header and Message List

Display the parent message context and threaded replies using CometChatThreadedHeader and CometChatMessageList with parentMessageId. File: cometchat_thread.dart

4. Thread Composer

Add the message composer with parentMessageId to send replies in the thread context. File: cometchat_thread.dart

5. Blocked User Handling

When a user is blocked, replace the composer with an unblock prompt. File: cometchat_thread.dart

Feature Matrix


Next Steps

Message List

Render real-time message threads.

Thread Header

Customize the thread header component.

All Guides

Browse all feature and formatter guides.

Sample App

Full working sample application on GitHub.