CometChatThreadedHeader displays the parent message of a thread along with reply count and provides the container for threaded message list and composer. It enables organized threaded conversations within a chat.

Where It Fits
CometChatThreadedHeader is used when a user taps “Reply in Thread” on a message. It wraps the parent message display with a CometChatMessageList (filtered by parentMessageId) and CometChatMessageComposer for thread replies.
- Dart
Quick Start
- Dart
- Dart
BaseMessage object as the parent message.
Actions and Events
Callback Methods
onBack
Fires when the user presses the back button.
- Dart
onError
Fires on internal errors.
- Dart
SDK Events (Real-Time, Automatic)
| SDK Listener | Internal behavior |
|---|---|
| New thread reply received | Increments reply count |
| Parent message edited | Updates parent message display |
| Parent message deleted | Updates parent message display |
Functionality
| Property | Type | Default | Description |
|---|---|---|---|
parentMessage | BaseMessage | required | The parent message of the thread |
loggedInUser | User | required | The currently logged-in user |
showBackButton | bool? | true | Toggle back button visibility |
title | String? | null | Custom title text |
hideMessageComposer | bool? | false | Hide the message composer |
Custom View Slots
Bubble View
Replace the parent message bubble display.- Dart
Advanced
BLoC Access
The threaded header usesThreadedHeaderBloc internally:
| Component | Description |
|---|---|
ThreadedHeaderBloc | Manages threaded header state |
ThreadedHeaderEvent | Events: InitializeThreadedHeader, IncrementReplyCount, UpdateParentMessage |
ThreadedHeaderState | Threaded header state with parent message and reply count |
Style
- Dart

Next Steps
Message List
Display messages in a conversation
Message Composer
Compose and send messages
Threaded Messages Guide
Complete threaded messages implementation
Component Styling
Detailed styling reference