AI Agent Component Spec
AI Agent Component Spec
Where It Fits
CometChatThreadedHeader is a component that displays the parent message of a thread along with a reply count. It’s typically used as part of the ThreadedMessages composite component, appearing at the top of the threaded conversation view. ThreadedMessages is composed of the following widgets:| Widget | Description |
|---|---|
| MessageList | CometChatMessageList displays a list of reply messages |
| MessageComposer | CometChatMessageComposer helps in writing and sending replies |

Minimal Render
The simplest way to render CometChatThreadedHeader:- Dart
- Dart
- Dart
Actions and Events
Callback Props
The CometChatThreadedHeader component does not have traditional callback props. Instead, it provides amessageActionView slot for customizing the action area.
Global UI Events
The CometChatThreadedHeader component does not produce any global UI events.Custom View Slots
Customize the appearance of CometChatThreadedHeader by replacing default views with your own widgets.| Slot | Signature | Replaces |
|---|---|---|
messageActionView | Widget Function(BaseMessage message, BuildContext context)? | Reply count section below the message bubble |
Example: Custom Message Action View
- Dart
- Android
- iOS

Example: Custom Reply Count with Dividers
- Dart

Templates
Thetemplate prop is used to configure and set a message template for the parent message bubble. It allows for dynamic customization of message appearance, content, or other predefined settings based on the template provided.
- Dart
Styling
Customize the appearance of CometChatThreadedHeader usingCometChatThreadedHeaderStyle.
- Dart
Style Properties
| Property | Type | Description |
|---|---|---|
bubbleContainerBackGroundColor | Color? | Background color for the bubble container |
bubbleContainerBorder | BoxBorder? | Border for the bubble container |
bubbleContainerBorderRadius | BorderRadiusGeometry? | Border radius for the bubble container |
countTextStyle | TextStyle? | Text style for the reply count |
countTextColor | Color? | Color for the reply count text |
countContainerBackGroundColor | Color? | Background color for the count container |
countContainerBorder | BoxBorder? | Border for the count container |
constraints | BoxConstraints? | Constraints for the message container |
incomingMessageBubbleStyle | CometChatIncomingMessageBubbleStyle? | Style for incoming message bubble |
outgoingMessageBubbleStyle | CometChatOutgoingMessageBubbleStyle? | Style for outgoing message bubble |
Props Reference
| Prop | Type | Default | Description |
|---|---|---|---|
parentMessage | BaseMessage | Required | Parent message for the thread |
loggedInUser | User | Required | Logged in user object |
messageActionView | Function(BaseMessage, BuildContext)? | null | Custom action view for the message |
style | CometChatThreadedHeaderStyle? | null | Style parameter for the threaded header |
template | CometChatMessageTemplate? | null | Message template used in the thread |
height | double? | null | Height of the widget |
width | double? | null | Width of the widget |
receiptsVisibility | bool? | true | Controls visibility of receipts |
Message List
Display messages in a conversation
Message Composer
Compose and send messages
Theming
Learn how to customize the look and feel
Localization
Support multiple languages in your app
