Quick Setup ReferenceRequired Credentials: App ID, Region, Auth Key (dev) or Auth Token (prod)
Get from: CometChat Dashboard → Your App → API & Auth KeysIntegration Paths:
Get from: CometChat Dashboard → Your App → API & Auth KeysIntegration Paths:
- Conversation List + Message → flutter-conversation
- One-to-One Chat → flutter-one-to-one-chat
- Tab-Based Chat → flutter-tab-based-chat
Prerequisites
Before installing the CometChat UI Kit for Flutter, you must first create a CometChat application via the CometChat Dashboard. The dashboard provides all the essential chat service components, including:- User Management
- Group Chat & Messaging
- Voice & Video Calling
- Real-time Notifications
To initialize the UI Kit, you will need the following credentials from your CometChat application:
- App ID
- Auth Key
- Region
Register & Set Up CometChat
Follow these steps to register on CometChat and set up your development environment.Step 1: Register on CometChat
To use CometChat UI Kit, you first need to register on the CometChat Dashboard. 🔗 Click here to Sign UpStep 2: Get Your Application Keys
After registering, create a new app and retrieve your authentication details:- Navigate to the QuickStart or API & Auth Keys section.
-
Note down the following keys:
- App ID
- Auth Key
- Region
Each CometChat application can be integrated with a single client app. Users within the same application can communicate across multiple platforms, including iOS, Android, and web.
Step 3: Set Up Your Development Environment
Ensure your system meets the following prerequisites before proceeding with integration. System Requirements:- Flutter installed on your system (Flutter 3.0 or higher recommended)
- Android Studio or VS Code with configured Flutter/Dart plugins
- Xcode & CocoaPods for iOS development
- An iOS device or simulator with iOS 12.0 or above
- An Android device or emulator with Android version 5.0 (API level 21) or above
Getting Started
Step 1: Create Flutter Application Project
To get started, create a new Flutter application project:Step 2: Add Dependency
1. Update Pubspec To use this UI Kit in your Flutter project, you’ll need to add the following dependency to the dependencies section of yourpubspec.yaml file:
pubspec.yaml
pubspec.yaml Example:
pubspec.yaml
pubspec.yaml, run:
2. Android App Setup To ensure compatibility with the CometChat Calling UI Kit and its dependencies, your Flutter project must target a minimum SDK version of 24 or higher. Update the
minSdkVersion in your Android project configuration, located at android/app/build.gradle:
build.gradle
3. Update iOS Podfile In your Podfile (located at
ios/Podfile), update the minimum iOS version your project supports to 12.0:
Podfile
4. Import CometChat UIKit In your Dart code, import the CometChat UIKit package to access its features. Add the following import statement to your
main.dart file:
- Dart
main.dart
Step 3: Initialize UI Kit
Before using any features from the CometChat UI Kit, initialize it with your app credentials. 1. Import & Configure UIKit Settings You can store your app credentials (App ID, Auth Key, Region) in a dedicated configuration file and load them dynamically in your app. Example Configuration File:- Dart
cometchat_config.dart
- Dart
main.dart
Store your CometChat credentials in a config file to simplify environment management and avoid hardcoding sensitive information.
Step 4: Login to UI Kit
Once the UI Kit is initialized, authenticate your user using thelogin() method. You’ll receive a User object upon success.
- Dart
main.dart
cometchat-uid-1cometchat-uid-2cometchat-uid-3cometchat-uid-4cometchat-uid-5
- Dart
main.dart
Extract credentials into a separate file (
cometchat_config.dart) for better maintainability.Step 5: Choose a Chat Experience
Integrate a conversation view that suits your application’s UX requirements. Below are the available options:1️⃣ Conversation List + Message View
Best for: Flutter apps that need a smooth, stack-based navigation between conversations and messages. Highlights:- Compact Layout – Uses
Navigator.push()for mobile-first navigation - One-to-One & Group Chats – Built-in support for private and group conversations
- Real-Time Messaging – Message list and view auto-refresh with CometChat events
- State Persistence – Session-aware updates across screens and app restarts
- Mobile-First UI – Optimized widgets that adapt to different screen sizes
- Extremely Customizable – Modify styles, themes, and components easily

- You want a clean navigation experience for multiple chat sessions
- Your Flutter app supports both direct and group messaging
- You prefer a stack-based routing approach using
Navigator
2️⃣ One-to-One / Group Chat
Best for: When a user lands directly into a chat screen, bypassing the conversation list. Highlights:- Single Screen Chat – Use
CometChatMessageListwidget with preselected user/group - No Conversation List – Start with just the message screen
- Ideal for support & contextual chat – Ticket-based or user-to-agent communication
- Simplified Routing – Pass user/group as route argument
- Real-Time Communication – Auto-updates messages and statuses

- Your chat starts from a specific user or group ID
- You want a clean, focused chat interface
- Use case involves support, onboarding, or one-time messages
3️⃣ Tab-Based Messaging UI (All-in-One)
Best for: Flutter apps needing a multi-tab experience to access Chat, Users, Calls, and Settings. Highlights:- Tab Navigation – Use
BottomNavigationBarto switch between core features - Independent Screens – Chats, Calls, Users, and Settings in dedicated widgets
- No Sidebar – True mobile layout using bottom tabs, ideal for smaller devices
- Scalable – Add new tabs like Profile, Notifications, or Help later
- Seamless UX – Syncs chat state across tabs with minimal boilerplate

- You need a full-featured chat solution in one UI
- Your users require structured navigation between modules
- Use cases like support apps, business messengers, or social platforms
Build Your Own Chat Experience
Best for: Developers who need complete control over their chat interface, allowing customization of components, themes, and features to align with their app’s design and functionality. Whether you’re enhancing an existing chat experience or building from scratch, this approach provides the flexibility to tailor every aspect to your needs. Recommended for:- Apps that require a fully customized chat experience
- Developers who want to extend functionalities and modify UI components
- Businesses integrating chat seamlessly into existing platforms
- Flutter Sample App – Fully functional sample applications to accelerate your development
- Core Features – Learn about messaging, real-time updates, and other essential capabilities
- Components – Utilize prebuilt UI elements or customize them to fit your design
- Themes – Adjust colors, fonts, and styles to match your branding
- Build Your Own UI – Prefer a custom UI over our UI Kits? Explore our SDKs to create a tailored chat experience
Next Steps
Conversation List + Message
Two-panel layout with conversation list and message view
One-to-One Chat
Direct messaging interface for focused conversations
Tab-Based Chat
Multi-tab experience with chats, calls, users, and groups
Customize Theme
Adjust colors, fonts, and styles to match your brand