> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-audit-content-webhooks.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Flutter SDK

> Add real-time chat, voice, and video to your Flutter application with the CometChat SDK.

<Accordion title="AI Integration Quick Reference">
  ```yaml theme={null}
  # Install (pubspec.yaml)
  cometchat_sdk: ^4.0.33
  ```

  ```dart theme={null}
  import 'package:cometchat_sdk/cometchat_sdk.dart';

  // 1. Initialize (once at app startup)
  AppSettings appSettings = (AppSettingsBuilder()
    ..subscriptionType = CometChatSubscriptionType.allUsers
    ..region = "APP_REGION" // e.g. "us", "eu", "in"
    ..autoEstablishSocketConnection = true
  ).build();

  CometChat.init("APP_ID", appSettings,
    onSuccess: (msg) => debugPrint("Init success"),
    onError: (e) => debugPrint("Init failed: ${e.message}"),
  );

  // 2. Login (check session first)
  CometChat.getLoggedInUser(
    onSuccess: (user) {
      if (user == null) {
        CometChat.login("cometchat-uid-1", "AUTH_KEY", // dev only — use Auth Token in production
          onSuccess: (user) => debugPrint("Login success"),
          onError: (e) => debugPrint("Login failed"),
        );
      }
    },
    onError: (e) => debugPrint("Error: ${e.message}"),
  );
  ```

  **Credentials:** App ID, Region, Auth Key from [CometChat Dashboard](https://app.cometchat.com)
  **Test UIDs:** `cometchat-uid-1` through `cometchat-uid-5`
</Accordion>

The CometChat Flutter SDK lets you add real-time messaging, voice, and video calling to any Flutter application — iOS, Android, Web, or Desktop.

## Requirements

| Requirement       | Minimum Version |
| ----------------- | --------------- |
| Flutter SDK       | 1.2             |
| Android API Level | 21              |
| iOS               | 11              |

Requires AndroidX compatibility. For iOS platform setup, see [Setup](/sdk/flutter/setup#ios-setup).

## Getting Started

<Steps>
  <Step title="Get your credentials">
    [Sign up for CometChat](https://app.cometchat.com) and create an app. Note your App ID, Region, and Auth Key from the Dashboard.
  </Step>

  <Step title="Install and initialize">
    Add the SDK to your project and initialize it with your credentials. See [Setup](/sdk/flutter/setup).
  </Step>

  <Step title="Authenticate users">
    Log in users with Auth Key (development) or Auth Token (production). See [Authentication](/sdk/flutter/authentication-overview).
  </Step>

  <Step title="Start building">
    Send your first message, make a call, or manage users and groups.
  </Step>
</Steps>

## Features

<CardGroup cols={2}>
  <Card title="Messaging" icon="comments" href="/sdk/flutter/send-message">
    1:1 and group chat, threads, reactions, typing indicators, read receipts, file sharing, and interactive messages.
  </Card>

  <Card title="Voice & Video Calling" icon="phone" href="/sdk/flutter/calling-overview">
    Ringing flows, direct call sessions, standalone calling, recording, and screen sharing.
  </Card>

  <Card title="Users" icon="user" href="/sdk/flutter/users-overview">
    Create, retrieve, and manage users. Track online/offline presence and block/unblock users.
  </Card>

  <Card title="Groups" icon="users" href="/sdk/flutter/groups-overview">
    Public, private, and password-protected groups with member management, roles, and ownership transfer.
  </Card>
</CardGroup>

## Sample Apps

Explore working examples with full source code:

<CardGroup cols={2}>
  <Card title="Flutter Chat App" icon="mobile" href="https://github.com/cometchat-pro/flutter-chat-app/">
    Flutter sample app
  </Card>
</CardGroup>

## UI Kits

Skip the UI work — use pre-built, customizable components:

<CardGroup cols={2}>
  <Card title="Flutter UI Kit" icon="mobile" href="/ui-kit/flutter/overview">
    Flutter UI Kit
  </Card>
</CardGroup>

## Resources

<CardGroup cols={2}>
  <Card title="Key Concepts" icon="lightbulb" href="/sdk/flutter/key-concepts">
    UIDs, GUIDs, auth tokens, and core SDK concepts
  </Card>

  <Card title="Message Structure" icon="sitemap" href="/sdk/flutter/message-structure-and-hierarchy">
    Message categories, types, and hierarchy
  </Card>

  <Card title="Changelog" icon="clock-rotate-left" href="/sdk/flutter/changelog">
    Latest SDK version and release notes
  </Card>

  <Card title="Upgrading from V3" icon="arrow-up" href="/sdk/flutter/upgrading-from-v3-guide">
    Migration guide for V3 users
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/sdk/flutter/troubleshooting">
    Common issues and solutions
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Setup" icon="gear" href="/sdk/flutter/setup">
    Install and initialize the CometChat Flutter SDK
  </Card>

  <Card title="Authentication" icon="lock" href="/sdk/flutter/authentication-overview">
    Log in users with Auth Key or Auth Token
  </Card>

  <Card title="Send Messages" icon="paper-plane" href="/sdk/flutter/send-message">
    Send your first text, media, or custom message
  </Card>

  <Card title="Key Concepts" icon="lightbulb" href="/sdk/flutter/key-concepts">
    UIDs, GUIDs, auth tokens, and core SDK concepts
  </Card>
</CardGroup>
