Quick Reference for AI Agents & DevelopersKey Components:
- Conversations → CometChatConversations
- Call Logs → CometChatCallLogs
- Users → CometChatUsers
- Groups → CometChatGroups
User Interface Preview

- Bottom Navigation Bar – Tabs for switching between Chats, Calls, Users, and Groups
- Page View – Displays the selected tab’s content
- Conversation List – Shows recent conversations with active users and groups
- Message View – Opens when a conversation is tapped
How It Works
This implementation uses Flutter’sBottomNavigationBar and PageView to create a tabbed interface:
- Bottom Navigation – Provides quick access to different sections
- Page View – Swipeable pages for each tab
- State Management – Syncs selected tab with page view
- Navigation – Tapping a conversation opens the message screen
Use Cases
- All-in-One Chat Apps – Complete messaging solution with multiple features
- Business Messengers – Professional communication with organized sections
- Social Platforms – Community chat with user discovery
- Support Apps – Help desk with call logs and user management
- Team Collaboration – Internal communication with group management
Implementation
Step 1: Render the Tab Component
The tab-based UI usesBottomNavigationBar for navigation and PageView for content display:
- Dart
main.dart
| Component | Purpose | Key Features |
|---|---|---|
PageView | Container for swipeable pages | Smooth transitions, gesture support |
BottomNavigationBar | Tab navigation | Icon + label, active state |
PageController | Controls page view | Jump to page, animate transitions |
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
Step 3: Run the App
Use the following command to run the app on a connected device or emulator:Tab Descriptions
1. Chat Tab
Displays recent conversations with users and groups:- CometChatConversations – Shows conversation list
- Real-time updates – New messages appear instantly
- Unread counts – Badge showing unread message count
- Last message preview – Shows snippet of last message
- Tap to open – Navigate to full message view
2. Calls Tab
Shows call history and logs:- CometChatCallLogs – Displays all call records
- Call types – Audio and video calls
- Call status – Missed, incoming, outgoing
- Tap to call back – Initiate new call from history
- Call duration – Shows length of completed calls
3. Users Tab
Browse and search all users:- CometChatUsers – Lists all available users
- Search functionality – Find users by name
- User status – Online/offline indicators
- Tap to chat – Start conversation with any user
- User avatars – Profile pictures
4. Groups Tab
Manage and join groups:- CometChatGroups – Shows all groups
- Group types – Public, private, password-protected
- Member count – Number of participants
- Join groups – Request to join or join directly
- Tap to chat – Open group conversation
Customization Options
Custom Tab Icons
- Dart
Custom Tab Colors
- Dart
Disable Swipe Between Tabs
- Dart
Add More Tabs
- Dart
Custom Tab Styling
- Dart
- Conversations Customization
- Call Logs Customization
- Users Customization
- Groups Customization
- Theming Guide
Common Use Cases
Badge for Unread Messages
Badge for Unread Messages
- Dart
Persist Selected Tab
Persist Selected Tab
- Dart
Animated Tab Transitions
Animated Tab Transitions
- Dart
Handle Back Button
Handle Back Button
Best Practices
Dispose Controllers
Dispose Controllers
Always dispose of controllers to prevent memory leaks:
- Dart
Use BottomNavigationBarType.fixed
Use BottomNavigationBarType.fixed
Lazy Load Tab Content
Lazy Load Tab Content
Load tab content only when needed:
- Dart
Handle Tab Refresh
Handle Tab Refresh
Refresh tab content when switching:
- Dart
Next Steps
Conversations
Customize the conversation list appearance and behavior
Call Logs
Configure call history and calling features
Users & Groups
Manage user lists and group memberships
Theming Guide
Customize colors, fonts, and styles to match your brand