Quick Reference for AI Agents & DevelopersKey Components:
- Conversations → CometChatConversations
- Message List → CometChatMessageList
- Message Composer → CometChatMessageComposer
- Message Header → CometChatMessageHeader

How It Works
This implementation uses Flutter’s navigation system to create a mobile-friendly chat experience:- Conversation List Screen – Displays all recent conversations using
CometChatConversations - Navigation – Tapping a conversation pushes the message screen onto the navigation stack
- Message Screen – Shows the full chat interface with header, message list, and composer
- Back Navigation – Users can return to the conversation list using the back button
Implementation
Step 1: Render the Conversation Component
TheCometChatConversations widget displays all conversations related to the currently logged-in user. Follow the steps below to render this component:
- Dart
main.dart
| Property | Type | Description |
|---|---|---|
showBackButton | bool | Shows/hides the back button in the app bar |
onItemTap | Function | Callback when a conversation is tapped |
conversationWith | User or Group | The target entity (user or group) for the conversation |
Full Example: main.dart
- Dart
main.dart
Step 2: Render the Messages Component
To create a complete messaging view, include the following components inmessages_screen.dart:
- Message Header – Displays conversation title and actions
- Message List – Shows all messages in the conversation
- Message Composer – Input field for sending messages

- Dart
messages_screen.dart
| Component | Purpose | Key Features |
|---|---|---|
CometChatMessageHeader | Shows conversation title, avatar, and actions | User/group info, back button, call buttons |
CometChatMessageList | Displays messages in chronological order | Real-time updates, reactions, replies |
CometChatMessageComposer | Input field for composing messages | Text, media, attachments, emojis |
Step 3: Run the App
Use the following command to run the app on a connected device or emulator:Customization Options
Conversation List Customization
- Dart
Message Screen Customization
- Dart
Common Use Cases
Filter Conversations by Type
Filter Conversations by Type
- Dart
Handle Conversation Long Press
Handle Conversation Long Press
- Dart
Navigate with Custom Animation
Navigate with Custom Animation
Next Steps
Customize Conversations
Learn about all conversation list customization options
Message Components
Explore message list, header, and composer features
Theming Guide
Customize colors, fonts, and styles to match your brand
Events & Listeners
Handle real-time events and user interactions