cometchat_chat_uikit 6.1.0 copy "cometchat_chat_uikit: ^6.1.0" to clipboard
cometchat_chat_uikit: ^6.1.0 copied to clipboard

CometChat's Flutter UI Kit offers custom UI components for streamlined text and chat features in your app, designed with developers in mind to minimize development effort.

CometChat Flutter UI Kit #

CometChat's Flutter UI Kit offers a set of prebuilt, customizable UI components that let you add text chat, media messaging, reactions, threads, and voice/video calling to your Flutter app with minimal development effort.

[CometChat Flutter UI Kit]

Features #

  • Conversations, Messages & Composer — ready-made list, message, and input widgets with receipts, reactions, replies, and threads.
  • Users & Groups — browse users, manage groups, and handle group members.
  • Voice & Video Calling — optional calling UI powered by the CometChat Calls SDK.
  • Theming & Localization — fully themeable components with built-in translations for many locales.
  • Cross-platform — Android, iOS, and Web.

Installation #

Add the package to your pubspec.yaml:

dependencies:
  cometchat_chat_uikit: ^6.0.3

Then run:

flutter pub get

Quick start #

  1. Create an app in the CometChat Dashboard and note your App ID, Region, and Auth Key.
  2. Initialize the UI Kit and log a user in:
import 'package:flutter/material.dart';
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';

Future<void> initCometChat() async {
  final uiKitSettings = (UIKitSettingsBuilder()
        ..subscriptionType = CometChatSubscriptionType.allUsers
        ..region = '<YOUR_REGION>'
        ..appId = '<YOUR_APP_ID>'
        ..authKey = '<YOUR_AUTH_KEY>'
        ..autoEstablishSocketConnection = true)
      .build();

  CometChatUIKit.init(
    uiKitSettings: uiKitSettings,
    onSuccess: (_) {
      CometChatUIKit.login('<UID>', onSuccess: (_) {}, onError: (_) {});
    },
    onError: (_) {},
  );
}
  1. Drop a component into your widget tree:
const SafeArea(child: CometChatConversations());

A complete, runnable sample lives in example/.

Documentation #

License #

This project is licensed under the MIT License.