Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2188,6 +2188,7 @@
"group": "Chat",
"pages": [
"ui-kit/flutter/core-features",
"ui-kit/flutter/offline-support",
"ui-kit/flutter/extensions"
]
},
Expand Down
2 changes: 1 addition & 1 deletion ui-kit/flutter/calling-integration.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Calling Integration"
description: "Add voice and video calling to your Flutter UI Kit app: enable calls, ring incoming calls with cometchat_voip through the UI Kit's call push bridge, permissions and logout."

Check warning on line 3 in ui-kit/flutter/calling-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/calling-integration.mdx#L3

Did you really mean 'cometchat_voip'?
---

## Overview
Expand Down Expand Up @@ -37,7 +37,7 @@

```yaml pubspec.yaml
dependencies:
cometchat_chat_uikit: ^6.3.0
cometchat_chat_uikit: ^6.4.0
cometchat_voip: ^2.0.0
firebase_core: ^3.0.0
firebase_messaging: ^15.0.0
Expand All @@ -49,7 +49,7 @@
</Tab>
<Tab title="iOS">
1. `platform :ios, '15.1'` in the `Podfile` (already required by the UI Kit).
2. In Xcode, add the **Push Notifications** capability, and under **Background Modes** check **Voice over IP** and **Remote notifications**.

Check warning on line 52 in ui-kit/flutter/calling-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/calling-integration.mdx#L52

Did you really mean 'Xcode'?
3. Add `NSMicrophoneUsageDescription` and `NSCameraUsageDescription` to `Info.plist`.

No `AppDelegate` code is needed: `cometchat_voip` owns PushKit and CallKit. Don't create a `PKPushRegistry` of your own; a second registry takes the VoIP pushes and those calls never ring.
Expand All @@ -58,7 +58,7 @@

Push notifications must be enabled in the CometChat dashboard, with the push providers set up. See [Getting Started](/notifications/push-getting-started).

## Step 2: Initialize the Calls SDK and cometchat_voip

Check warning on line 61 in ui-kit/flutter/calling-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/calling-integration.mdx#L61

Did you really mean 'cometchat_voip'?

`cometchat_voip` needs the Calls SDK initialized first. Do both at app start, before `CometChatUIKit.init`, and again in the Android background message handler (Step 5), where your app's start-up code hasn't run:

Expand Down Expand Up @@ -88,7 +88,7 @@

Every `cometchat_voip` option (ring timeout, missed call notifications, your own ring screen) is on the Calls SDK's [Push Ringing](/calls/flutter/voip-calling#step-2-initialize) page. To colour the ring screen with your UI Kit theme, see [Styling the ring screen](#styling-the-ring-screen).

## Step 3: Connect cometchat_voip to the UI Kit

Check warning on line 91 in ui-kit/flutter/calling-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/calling-integration.mdx#L91

Did you really mean 'cometchat_voip'?

The UI Kit doesn't depend on `cometchat_voip`. It talks to the push ringer through `CometChatCallPushBridge`, which your app implements over `cometchat_voip`. Through the bridge the UI Kit:

Expand Down Expand Up @@ -196,7 +196,7 @@

With `enableCalls`, `CometChatUIKit.init` initializes the Calls SDK and `CometChatUIKit.login` logs the user into it. Initialize and log in at app start from stored credentials, not only after a screen opens: an answer can start the app, and the UI Kit joins it as soon as the user is logged in.

## Step 5: Hand call pushes to cometchat_voip

Check warning on line 199 in ui-kit/flutter/calling-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/calling-integration.mdx#L199

Did you really mean 'cometchat_voip'?

On Android, pass every push to `cometchat_voip`, from both the foreground and the background handler. It returns `true` for a call push; anything else is yours to handle (chat notifications, for example).

Expand Down Expand Up @@ -266,7 +266,7 @@
);
```

Unregister the push token first, while the user's session still works. `CometChatUIKit.logout` then declines a call still ringing, cancels an outgoing call still ringing, leaves a call in progress, and logs out of the Chat SDK and the Calls SDK. `CometChat.logout` alone does none of the calling clean-up.

Check warning on line 269 in ui-kit/flutter/calling-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/calling-integration.mdx#L269

Did you really mean 'Unregister'?

## Styling the ring screen

Expand Down Expand Up @@ -358,8 +358,8 @@
| Moment | What happens | Component |
|--------|--------------|-----------|
| Tap a call button | The call is placed, then the outgoing call screen opens | [Call Buttons](/ui-kit/flutter/call-buttons) |
| Waiting | "Calling…", then "Ringing…" when the callee's phone is reached; End cancels the call; 45 seconds with no answer ends it as unanswered | [Outgoing Call](/ui-kit/flutter/outgoing-call) |

Check warning on line 361 in ui-kit/flutter/calling-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/calling-integration.mdx#L361

Did you really mean 'callee's'?
| Callee declines, is busy or doesn't answer | The outgoing call screen closes | Outgoing Call |

Check warning on line 362 in ui-kit/flutter/calling-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/calling-integration.mdx#L362

Did you really mean 'Callee'?
| Incoming call | `cometchat_voip` rings and draws the ring screen (CallKit on iOS), in your UI Kit colours once you [pass them](#styling-the-ring-screen) | `cometchat_voip` (no UI Kit component) |
| Answer | The UI Kit's call screen opens and joins | Call screen |
| A call during a 1:1 call | Rings over it; answering ends the current call and joins the new one | Call screen |
Expand All @@ -375,4 +375,4 @@

## Upgrading from an app that used `CometChat.addCallListener`

Remove the `CallListener` you registered to show the UI Kit's incoming call screen, and any push, PushKit, CallKit or `flutter_callkit_incoming` code you wrote to ring calls in the background, then follow the steps above. The UI Kit no longer re-exports `CallListener` and `CallListener2`; import them from `cometchat_sdk` if you still use them on web. The method-by-method mapping is on [Migrating from Legacy Ringing](/calls/flutter/migrating-from-legacy-ringing).

Check warning on line 378 in ui-kit/flutter/calling-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/calling-integration.mdx#L378

Did you really mean 'cometchat_sdk'?
7 changes: 6 additions & 1 deletion ui-kit/flutter/conversations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
| Layout | Fills its parent — place it in an `Expanded` (or a sized box) inside a `Column`, or layout throws an unbounded-height error at render. |
| Stitching | Tap a conversation to open a message view built from `CometChatMessageHeader` + `CometChatMessageList` + `CometChatMessageComposer`. |
| Prerequisites | `CometChatUIKit` initialised and a user logged in. |
| Full props | [72 props](#functionality) |
| Full props | [73 props](#functionality) |

</Accordion>

`CometChatConversations` renders a scrollable list of recent conversations with real-time updates for new messages, typing indicators, read receipts, and user presence.

Check warning on line 25 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L25

Did you really mean 'scrollable'?

---

Expand Down Expand Up @@ -80,6 +80,10 @@

Prerequisites: CometChat SDK initialized with `CometChatUIKit.init()`, a user logged in, and the UI Kit dependency added.

<Note>
With [offline support](/ui-kit/flutter/offline-support) on, the list shows saved conversations at once, shows **Connect to load chats** when it is offline with nothing saved, and marks a conversation whose last message is waiting to send or failed. See [Lists](/ui-kit/flutter/offline-support#lists).
</Note>

---

## Filtering Conversations
Expand Down Expand Up @@ -154,7 +158,7 @@
<Tab title="Dart">
```dart
CometChatConversations(
onBack: () {

Check warning on line 161 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L161

Did you really mean 'onBack'?
Navigator.pop(context);
},
)
Expand All @@ -170,8 +174,8 @@
<Tab title="Dart">
```dart
CometChatConversations(
selectionMode: SelectionMode.multiple,

Check warning on line 177 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L177

Did you really mean 'selectionMode'?
onSelection: (selectedConversations) {

Check warning on line 178 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L178

Did you really mean 'onSelection'?

Check warning on line 178 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L178

Did you really mean 'selectedConversations'?
// Handle selected conversations
},
)
Expand All @@ -187,7 +191,7 @@
<Tab title="Dart">
```dart
CometChatConversations(
onError: (e) {

Check warning on line 194 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L194

Did you really mean 'onError'?
debugPrint("Error: $e");
},
)
Expand All @@ -203,7 +207,7 @@
<Tab title="Dart">
```dart
CometChatConversations(
onLoad: (conversations) {

Check warning on line 210 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L210

Did you really mean 'onLoad'?
debugPrint("Loaded ${conversations.length}");
},
)
Expand All @@ -219,7 +223,7 @@
<Tab title="Dart">
```dart
CometChatConversations(
onEmpty: () {

Check warning on line 226 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L226

Did you really mean 'onEmpty'?
debugPrint("No conversations");
},
)
Expand Down Expand Up @@ -307,6 +311,7 @@
| `onItemTap` | `Function(Conversation conversation)?` | `null` | `onItemTap` callback triggered on tapping a conversation item |
| `onItemLongPress` | `Function(Conversation conversation)?` | `null` | `onItemLongPress` callback triggered on pressing for long on a conversation item |
| `hideAppbar` | `bool?` | `false` | Toggle app bar visibility |
| `hideOfflineNotices` | `bool` | `false` | With [offline support](/ui-kit/flutter/offline-support#hide-the-offline-notices) running, hides the offline notices this list shows. No effect with offline support off |
| `textFormatters` | `List<CometChatTextFormatter>?` | `null` | `textFormatters` is a list of text formatters for message bubbles with type text |
| `mentionAllLabel` | `String?` | `null` | `mentionAllLabel` is a String which is used to set a custom label for @all mentions |
| `mentionAllLabelId` | `String?` | `null` | `mentionAllLabelId` is a String which is used to set a custom label ID for @all mentions |
Expand Down Expand Up @@ -373,7 +378,7 @@
<Tab title="Dart">
```dart
CometChatConversations(
leadingView: (context, conversation) {

Check warning on line 381 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L381

Did you really mean 'leadingView'?
return CircleAvatar(
child: Text(_displayName(conversation).isNotEmpty ? _displayName(conversation)[0] : ""),
);
Expand All @@ -391,7 +396,7 @@
<Tab title="Dart">
```dart
CometChatConversations(
titleView: (context, conversation) {

Check warning on line 399 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L399

Did you really mean 'titleView'?
return Text(
_displayName(conversation),
style: TextStyle(fontWeight: FontWeight.bold),
Expand All @@ -410,7 +415,7 @@
<Tab title="Dart">
```dart
CometChatConversations(
subtitleView: (context, conversation) {

Check warning on line 418 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L418

Did you really mean 'subtitleView'?
final msg = conversation.lastMessage;
if (msg is TextMessage) {
return Text(msg.text, maxLines: 1, overflow: TextOverflow.ellipsis);
Expand All @@ -430,7 +435,7 @@
<Tab title="Dart">
```dart
CometChatConversations(
trailingView: (conversation) {

Check warning on line 438 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L438

Did you really mean 'trailingView'?
if (conversation.unreadMessageCount > 0) {
return Badge(label: Text("${conversation.unreadMessageCount}"));
}
Expand Down Expand Up @@ -486,7 +491,7 @@
```dart
// Replace all options
CometChatConversations(
setOptions: (conversation, bloc, context) {

Check warning on line 494 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L494

Did you really mean 'setOptions'?
return [
CometChatOption(
id: "delete",
Expand All @@ -502,7 +507,7 @@

// Append to defaults
CometChatConversations(
addOptions: (conversation, bloc, context) {

Check warning on line 510 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L510

Did you really mean 'addOptions'?
return [
CometChatOption(
id: "archive",
Expand Down Expand Up @@ -555,8 +560,8 @@
<Tab title="Dart">
```dart
CometChatConversations(
hideAppbar: true,

Check warning on line 563 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L563

Did you really mean 'hideAppbar'?
hideSearch: true,

Check warning on line 564 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L564

Did you really mean 'hideSearch'?
)
```
</Tab>
Expand All @@ -581,7 +586,7 @@
<Tab title="Dart">
```dart
CometChatConversations(
datePattern: (conversation) {

Check warning on line 589 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L589

Did you really mean 'datePattern'?
final timestamp = conversation.updatedAt;
return DateFormat('MMM d').format(DateTime.fromMillisecondsSinceEpoch(timestamp! * 1000));
},
Expand All @@ -602,7 +607,7 @@
<Tab title="Dart">
```dart
CometChatConversations(
conversationsBloc: CustomConversationsBloc(),

Check warning on line 610 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L610

Did you really mean 'conversationsBloc'?
)
```
</Tab>
Expand All @@ -610,7 +615,7 @@

### Extending ConversationsBloc

`ConversationsBloc` uses the `ListBase<Conversation>` mixin with override hooks for custom list behavior:

Check warning on line 618 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L618

Did you really mean 'mixin'?

<Tabs>
<Tab title="Dart">
Expand Down Expand Up @@ -686,19 +691,19 @@
<Tab title="Dart">
```dart
CometChatConversations(
conversationsStyle: CometChatConversationsStyle(

Check warning on line 694 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L694

Did you really mean 'conversationsStyle'?
backgroundColor: Colors.white,

Check warning on line 695 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L695

Did you really mean 'backgroundColor'?
avatarStyle: CometChatAvatarStyle(

Check warning on line 696 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L696

Did you really mean 'avatarStyle'?
borderRadius: BorderRadius.circular(8),
backgroundColor: Color(0xFFFBAA75),

Check warning on line 698 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L698

Did you really mean 'backgroundColor'?
),
badgeStyle: CometChatBadgeStyle(

Check warning on line 700 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L700

Did you really mean 'badgeStyle'?
backgroundColor: Color(0xFFF76808),

Check warning on line 701 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L701

Did you really mean 'backgroundColor'?
),
receiptStyle: CometChatMessageReceiptStyle(),

Check warning on line 703 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L703

Did you really mean 'receiptStyle'?
typingIndicatorStyle: CometChatTypingIndicatorStyle(),
dateStyle: CometChatDateStyle(),

Check warning on line 705 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L705

Did you really mean 'dateStyle'?
mentionsStyle: CometChatMentionsStyle(),

Check warning on line 706 in ui-kit/flutter/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/conversations.mdx#L706

Did you really mean 'mentionsStyle'?
deleteConversationDialogStyle: CometChatConfirmDialogStyle(),
),
)
Expand Down
12 changes: 12 additions & 0 deletions ui-kit/flutter/core-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@

| Widgets | Functionality |
|---|---|
| [MessageList](/ui-kit/flutter/message-list#pin-or-save-a-message) | Adds Pin / Unpin and Save / Unsave to the message action menu when the features are enabled. |

Check warning on line 109 in ui-kit/flutter/core-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/core-features.mdx#L109

Did you really mean 'Unsave'?
| [MessageHeader](/ui-kit/flutter/message-header#pinned-messages) | Provides the "Pinned messages" entry in its ⋯ overflow menu. |
| [PinnedMessages](/ui-kit/flutter/pinned-messages) | Lists a conversation's pinned messages, with an Unpin affordance and tap-to-jump. |

Check warning on line 111 in ui-kit/flutter/core-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/core-features.mdx#L111

Did you really mean 'affordance'?
| [SavedMessages](/ui-kit/flutter/saved-messages) | Lists the logged-in user's saved messages across every conversation. |

Each feature is switched on per app and carries its own cap. The UI Kit reads both at login, and when a user reaches a cap it shows a toast naming the exact limit. See the [Pin & Save Messages guide](/ui-kit/flutter/guide-pin-and-save-messages) for end-to-end wiring.
Expand Down Expand Up @@ -185,3 +185,15 @@
CometChat facilitates Group Chats, allowing users to have conversations with multiple participants simultaneously.

For a comprehensive guide on implementing Groups, refer to our detailed [Groups guide](/ui-kit/flutter/guide-group-chat).

## Offline Support

Offline Support keeps chat usable without a network. Chats and messages the user has opened appear at once from the device, messages sent offline are queued and go out when the connection returns, and failed messages offer Retry and Delete. It is **off by default**: turn it on with `offlineConfig` on `UIKitSettingsBuilder` (UI Kit 6.4.0 and Chat SDK 5.1.2 or later).

| Components | Functionality |
| --- | --- |
| [Conversations](/ui-kit/flutter/conversations), [Users](/ui-kit/flutter/users), [Groups](/ui-kit/flutter/groups), [Group Members](/ui-kit/flutter/group-members) | Show saved rows first and merge the server's page in place; offline with nothing saved, show **Connect to load …**. |
| [Message List](/ui-kit/flutter/message-list) | Shows saved history, marks queued and failed messages, and offers **Connect to load more** at the end of the saved history. |
| [Message Composer](/ui-kit/flutter/message-composer) | Queues messages sent offline and restores an attachment tray that was not sent. Files picked into the tray upload only with a connection. |

See [Offline Support](/ui-kit/flutter/offline-support) for setup and the full behavior.
5 changes: 5 additions & 0 deletions ui-kit/flutter/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@
9. `onSchedulerMessageReceived`: Triggered when a [scheduler message](/sdk/flutter/interactive-messages) is received.
10. `onCustomInteractiveMessageReceived`: Triggered when a custom interactive message is received.

*Available since v6.1.1.* Pin, save and thread-subscription actions taken on a Kit surface are announced here. The pin and save events carry the full updated message, so a custom listing can add or drop a row without a refetch:

Check warning on line 141 in ui-kit/flutter/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/events.mdx#L141

Did you really mean 'refetch'?

1. `ccMessagePinned` / `ccMessageUnpinned`: Triggered when the logged-in user pins or unpins a message from a Kit surface.
2. `ccMessageSaved` / `ccMessageUnsaved`: Triggered when the logged-in user saves or unsaves a message from a Kit surface.

Check warning on line 144 in ui-kit/flutter/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/events.mdx#L144

Did you really mean 'unsaves'?
3. `ccThreadSubscriptionChanged`: Triggered when the logged-in user subscribes to or unsubscribes from a thread from any Kit surface — the message action menu, the header bell or the threaded header. Carries `(int parentMessageId, bool subscribed)` rather than a message. The message list also emits it with `subscribed: true`, without an SDK call, when it infers a server-side auto-subscribe: the user sends a reply in a thread, is @-mentioned in an incoming message, or receives the first reply to their own message. An unsubscribe also hard-deletes the thread's row server-side, so remove it locally.

<Note>
Expand All @@ -150,6 +150,11 @@

</Note>

*Available since v6.4.0.* With [offline support](/ui-kit/flutter/offline-support#offline-events) running, two more events are emitted. Both are default no-ops on `CometChatMessageEventListener`, and neither is emitted with offline support off:

1. `ccMessageSendStateChanged(message, state, reason)`: An own message's send state changed. `state` is a `CometChatMessageSendState`: `sending`, `sent` or `failed`. `reason` is the SDK's `MessageFailureReason`, set only for `failed`.
2. `ccOfflineCacheReset(reason, pendingMessagesLost)`: The Chat SDK rebuilt its offline cache. `pendingMessagesLost` is the number of unsent messages lost, or `null` when the SDK could not count them.

<Tabs>
<Tab title="Dart">
```dart
Expand Down
6 changes: 4 additions & 2 deletions ui-kit/flutter/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@

**iii. Platform & IDE Setup**

* Flutter 3.38.9 or later (Dart 3.10.8 or later) installed on your system — the minimum toolchain the UI Kit declares.

Check warning on line 41 in ui-kit/flutter/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/getting-started.mdx#L41

Did you really mean 'toolchain'?
* Android Studio or VS Code with configured Flutter/Dart plugins.
* Xcode & Pod (CocoaPods) for iOS.

Check warning on line 43 in ui-kit/flutter/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/getting-started.mdx#L43

Did you really mean 'Xcode'?
* An iOS device or simulator with iOS 15.1 or above.
* An Android device or emulator with Android 8.0 (API 26) or above.

Expand All @@ -56,7 +56,7 @@

```yaml pubspec.yaml
dependencies:
cometchat_chat_uikit: ^6.3.0
cometchat_chat_uikit: ^6.4.0
```

Final `pubspec.yaml`
Expand All @@ -76,7 +76,7 @@
flutter:
sdk: flutter

cometchat_chat_uikit: ^6.3.0
cometchat_chat_uikit: ^6.4.0

cupertino_icons: ^1.0.8

Expand Down Expand Up @@ -107,16 +107,16 @@

<Note>
**26, not the UI Kit's own floor.** `cometchat_chat_uikit` depends on `cometchat_calls_sdk`
unconditionally, and that package pins `minSdkVersion 26`. Gradle takes the maximum across the

Check warning on line 110 in ui-kit/flutter/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/getting-started.mdx#L110

Did you really mean 'Gradle'?
dependency graph, so a lower value here is a manifest-merger error — whether or not your app uses
calling.
</Note>

***

**3. Update iOS Podfile**

Check warning on line 117 in ui-kit/flutter/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/getting-started.mdx#L117

Did you really mean 'Podfile'?

In your Podfile (located at `ios/Podfile`), update the minimum iOS version:

Check warning on line 119 in ui-kit/flutter/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/getting-started.mdx#L119

Did you really mean 'Podfile'?

```ruby Podfile
platform :ios, '15.1'
Expand All @@ -130,7 +130,7 @@

***

**4. Import CometChat UIKit**

Check warning on line 133 in ui-kit/flutter/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/getting-started.mdx#L133

Did you really mean 'UIKit'?

In your Dart code, import the CometChat UIKit package:

Expand Down Expand Up @@ -184,6 +184,8 @@

> **Calling:** voice and video calls need `enableCalls = true` here, plus push ringing with `cometchat_voip` for incoming calls, and UI Kit 6.3.0 or later. See [Calling Integration](/ui-kit/flutter/calling-integration).

> **Optional: offline support.** To show saved chats without a connection and queue messages sent offline, add `..offlineConfig = const OfflineConfig(enabled: true)` to the builder. It needs UI Kit 6.4.0 and Chat SDK 5.1.2 or later. See [Offline Support](/ui-kit/flutter/offline-support).

***

### **Step 4: Login to UI Kit**
Expand Down
2 changes: 1 addition & 1 deletion ui-kit/flutter/guide-pin-and-save-messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

## Pin & Save in the Message List

With the features enabled, [CometChatMessageList](/ui-kit/flutter/message-list#pin-or-save-a-message) adds **Pin message** / **Unpin message** and **Save message** / **Unsave message** to the action menu of any sent, non-deleted message. The labels follow the message's current state.

Check warning on line 54 in ui-kit/flutter/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/guide-pin-and-save-messages.mdx#L54

Did you really mean 'Unsave'?

- **Pin** permission is enforced by the **server**, not the UI Kit: the option is shown to every participant, and a user who lacks permission gets a "You don't have permission to perform this action." toast when they tap it. Build custom pin UI the same way — show the action and handle the denial, rather than trying to predict the verdict client-side.
- **Save** has no role gate — every user can save any message they can read.
Expand Down Expand Up @@ -107,7 +107,7 @@
ListTile(
leading: const Icon(Icons.bookmark_outline),
title: const Text("Saved messages"),
onTap: () => Navigator.of(context).push(

Check warning on line 110 in ui-kit/flutter/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/guide-pin-and-save-messages.mdx#L110

Did you really mean 'onTap'?
MaterialPageRoute(
builder: (_) => CometChatSavedMessages(onItemTap: _openSavedMessage),
),
Expand Down Expand Up @@ -169,7 +169,7 @@

## Live Updates

All surfaces stay in sync through the UI Kit event bus and the SDK listeners — pinning from the action menu updates the bubble glyph and the Pinned Messages screen without a refetch, pins made by other members arrive through `onMessagePinned`, and saves made on the user's other devices arrive through `onMessageSaved`. If you build custom UI, listen for `ccMessagePinned` / `ccMessageUnpinned` / `ccMessageSaved` / `ccMessageUnsaved` on `CometChatMessageEvents`; see [Events](/ui-kit/flutter/events).
All surfaces stay in sync through the UI Kit event bus and the SDK listeners — pinning from the action menu updates the bubble glyph and the Pinned Messages screen without a refetch, pins made by other members arrive through `onMessagePinned`, and saves made on the user's other devices arrive through `onMessageSaved`. The device that pins or saves updates from the call's `onSuccess` result, not from a listener: since Chat SDK 5.1.2 that device gets no callback for its own action. UI Kit 6.4.0 does this for you; if you call `CometChat.pinMessage` or `CometChat.saveMessage` yourself, update your UI from `onSuccess`. If you build custom UI, listen for `ccMessagePinned` / `ccMessageUnpinned` / `ccMessageSaved` / `ccMessageUnsaved` on `CometChatMessageEvents`; see [Events](/ui-kit/flutter/events).

Check warning on line 172 in ui-kit/flutter/guide-pin-and-save-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/guide-pin-and-save-messages.mdx#L172

Did you really mean 'refetch'?

## Summary / Feature Matrix

Expand Down
1 change: 1 addition & 0 deletions ui-kit/flutter/llms-flutter-v6.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
- **Lists need a bounded box.** `CometChatMessageList`, `CometChatConversations` and the other
list widgets fill their parent. Put them in an `Expanded` (or a sized box) inside a `Column`,
or layout throws an unbounded-height error at render, not at build.
- **Widgets paint their own surface.** The app `ThemeData` does not reach inside a kit widget's

Check warning on line 44 in ui-kit/flutter/llms-flutter-v6.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/llms-flutter-v6.mdx#L44

Did you really mean 'widget's'?
background. Scope colours with the widget's own style object — `CometChatMessageListStyle`,

Check warning on line 45 in ui-kit/flutter/llms-flutter-v6.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/llms-flutter-v6.mdx#L45

Did you really mean 'widget's'?
`CometChatMessageComposerStyle`, and so on — see [Component Styling](/ui-kit/flutter/component-styling).
- **Theming is `ThemeExtension`, not a theme object.** Register `CometChatColorPalette`,
`CometChatTypography` and `CometChatSpacing` in `ThemeData.extensions`. Register them on
Expand All @@ -53,14 +53,14 @@
[MessageTemplateUtils & Data Source](/ui-kit/flutter/customization-datasource) and
[Upgrading from v5](/ui-kit/flutter/upgrading-from-v5).
- **Custom message types: use `addTemplate`, never `templates`.** `addTemplate:` merges your
template with the defaults **and** folds its type/category into the list's fetch and realtime

Check warning on line 56 in ui-kit/flutter/llms-flutter-v6.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/llms-flutter-v6.mdx#L56

Did you really mean 'realtime'?
filter. `templates:` replaces the default set and only registers the bubble — a custom type
passed there sends successfully and then **never appears**, with no error anywhere. A
hand-rolled `MessagesRequestBuilder` does not rescue it either: the list always overrides
`uid`, `guid`, `types` and `categories` on the builder you pass. See
[Message List](/ui-kit/flutter/message-list) and [Message Template](/ui-kit/flutter/message-template).
- **Messages you send yourself must announce themselves.** CometChat does not deliver a client
its own sends over the realtime listener, so a message sent with `CometChat.send*Message`

Check warning on line 63 in ui-kit/flutter/llms-flutter-v6.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/llms-flutter-v6.mdx#L63

Did you really mean 'realtime'?
rather than through `CometChatMessageComposer` never reaches an already-mounted
`CometChatMessageList` — it only appears on that list's next fetch. Emit
`CometChatMessageEvents.ccMessageSent(...)` in `onSuccess`. See [Events](/ui-kit/flutter/events).
Expand All @@ -68,7 +68,7 @@
## Hot path — usually no fetch needed
For a plain "add chat" the install, `init → login → render`, and the core drop-in props are
stable; a well-built agent skill bakes them. Fetch below only for exhaustive props, long-tail
components, theming tokens, or feature enablement.

Check warning on line 71 in ui-kit/flutter/llms-flutter-v6.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/llms-flutter-v6.mdx#L71

Did you really mean 'enablement'?
- Setup: [Getting Started](/ui-kit/flutter/getting-started)
- Core drop-ins: [Conversations](/ui-kit/flutter/conversations) · [Message Header](/ui-kit/flutter/message-header) · [Message List](/ui-kit/flutter/message-list) · [Message Composer](/ui-kit/flutter/message-composer)

Expand All @@ -77,6 +77,7 @@
- [Flutter UI Kit — Overview](/ui-kit/flutter/overview)
- [Components Overview](/ui-kit/flutter/components-overview)
- [Core Features](/ui-kit/flutter/core-features)
- [Offline Support](/ui-kit/flutter/offline-support)

## Core & configuration
- [Methods](/ui-kit/flutter/methods)
Expand Down Expand Up @@ -133,13 +134,13 @@
[View Slots](/ui-kit/flutter/customization-view-slots)
- **Loading / empty / error states** — [State Views](/ui-kit/flutter/customization-state-views)
- **Long-press menu / composer actions** — [Menu & Options](/ui-kit/flutter/customization-menu-options)
- **Driving a widget's data yourself** — [BLoC & Data](/ui-kit/flutter/customization-bloc-data)

Check warning on line 137 in ui-kit/flutter/llms-flutter-v6.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/llms-flutter-v6.mdx#L137

Did you really mean 'widget's'?
- **Text formatters** — [Text Formatters](/ui-kit/flutter/customization-text-formatters)

Check warning on line 138 in ui-kit/flutter/llms-flutter-v6.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/llms-flutter-v6.mdx#L138

Did you really mean 'formatters'?
- **UI events** — `CometChatUIEvents` → [Events](/ui-kit/flutter/events)
- **Kit methods** — [Methods](/ui-kit/flutter/methods)
- **Where to start** — [Customization Overview](/ui-kit/flutter/customization-overview)

## Text formatters

Check warning on line 143 in ui-kit/flutter/llms-flutter-v6.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/llms-flutter-v6.mdx#L143

Did you really mean 'formatters'?
- [Custom Text Formatter](/ui-kit/flutter/custom-text-formatter-guide)
- [Mentions Formatter](/ui-kit/flutter/mentions-formatter-guide)
- [Shortcut Formatter](/ui-kit/flutter/shortcut-formatter-guide)
Expand Down
33 changes: 33 additions & 0 deletions ui-kit/flutter/localize.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

The UI Kit supports 19 languages:

* Arabic (ar), German (de), English (en, en-GB), Spanish (es), French (fr), Hindi (hi), Hungarian (hu), Japanese (ja), Korean (ko), Lithuanian (lt), Malay (ms), Dutch (nl), Portuguese (pt), Russian (ru), Swedish (sv), Turkish (tr), Chinese (zh, zh-TW)

Check warning on line 23 in ui-kit/flutter/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/localize.mdx#L23

Did you really mean 'hu'?

Check warning on line 23 in ui-kit/flutter/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/localize.mdx#L23

Did you really mean 'ko'?

Check warning on line 23 in ui-kit/flutter/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/localize.mdx#L23

Did you really mean 'lt'?

Check warning on line 23 in ui-kit/flutter/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/localize.mdx#L23

Did you really mean 'nl'?

Check warning on line 23 in ui-kit/flutter/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/localize.mdx#L23

Did you really mean 'ru'?

Check warning on line 23 in ui-kit/flutter/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/localize.mdx#L23

Did you really mean 'sv'?

Check warning on line 23 in ui-kit/flutter/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/localize.mdx#L23

Did you really mean 'zh'?

## Usage

Expand All @@ -31,7 +31,7 @@
<Tabs>
<Tab title="Dart">
```yaml
flutter_localizations:

Check warning on line 34 in ui-kit/flutter/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/localize.mdx#L34

Did you really mean 'flutter_localizations'?
sdk: flutter
```
</Tab>
Expand Down Expand Up @@ -172,6 +172,39 @@
</Tab>
</Tabs>

### Offline Strings

UI Kit 6.4.0 adds 22 strings for [offline support](/ui-kit/flutter/offline-support#offline-states-and-texts), translated in every built-in language. They appear only while offline support is running. Override them like any other getter. `messagesNotSent(int n)` and `unsentMessagesLost(int n)` take the count and return the singular or plural text.

| Getter | English text |
| --- | --- |
| `messageNotSentYet` | Not sent yet |
| `messageNotSentTapToRetry` | Not sent. Tap to retry |
| `unsentMessageRemoved` | Unsent message removed |
| `messagesNotSent(int n)` | 1 message wasn't sent / \{n\} messages weren't sent |
| `unsentMessagesLost(int n)` | 1 unsent message couldn't be recovered / \{n\} unsent messages couldn't be recovered |
| `unsentMessagesMaybeLost` | Some unsent messages may not have been sent |
| `queueFull` | Too many messages waiting to send |
| `fileTooLargeOffline` | File too large to send offline |
| `connectToLoadMore` | Connect to load more |
| `connectToSearch` | Connect to search |
| `connectToSearchSubtitle` | Search needs an internet connection. |
| `connectToLoadUsers` | Connect to load users |
| `connectToLoadGroups` | Connect to load groups |
| `connectToLoadMembers` | Connect to load members |
| `connectToLoadChats` | Connect to load chats |
| `connectToLoadMessages` | Connect to load messages |
| `connectToLoadReactions` | Connect to load reactions |
| `connectToLoadNotifications` | Connect to load notifications |
| `mediaAvailableWhenOnline` | Available when online |
| `jumpToLatest` | Jump to latest |
| `sendingTryAgain` | Sending… try again in a moment |
| `fileNotSaved` | File not saved. Add it again |

<Warning>
An app whose class `implements Translations` (or `CometChatLocalizations`) must add all 22 getters to compile with 6.4.0. A class that `extends` a translations class inherits the new strings and needs no change.

Check warning on line 205 in ui-kit/flutter/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/localize.mdx#L205

Did you really mean 'getters'?
</Warning>

### DateTimeFormatter

By providing a custom `DateTimeFormatterCallback`, you can globally configure how time and date values are displayed across all UI components. For details, refer to the [CometChatUIKit class](/ui-kit/flutter/methods#dateformatter).
4 changes: 4 additions & 0 deletions ui-kit/flutter/message-composer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@

In V6, the composer is powered by `MessageComposerBloc` and decomposed into focused sub-widgets.

<Note>
With [offline support](/ui-kit/flutter/offline-support) on, messages and voice notes sent without a connection are queued and sent when the connection returns, and an attachment tray that was not sent comes back when the chat is opened again. Files picked into the tray upload right away, which needs a connection: retry the tile once online. Editing a sent message needs a connection. See [Attachments and media](/ui-kit/flutter/offline-support#attachments-and-media).
</Note>

## Usage

### Integration
Expand Down Expand Up @@ -106,7 +110,7 @@

***

##### 2. onChange

Check warning on line 113 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L113

Did you really mean 'onChange'?

Handles changes in the value of text in the input field.

Expand All @@ -115,7 +119,7 @@
```dart
CometChatMessageComposer(
user: user,
onChange: (String? text) {

Check warning on line 122 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L122

Did you really mean 'onChange'?
// Handle text change
},
)
Expand All @@ -125,7 +129,7 @@

***

##### 3. onError

Check warning on line 132 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L132

Did you really mean 'onError'?

Listens for any errors that occur.

Expand All @@ -134,7 +138,7 @@
```dart
CometChatMessageComposer(
user: user,
onError: (e) {

Check warning on line 141 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L141

Did you really mean 'onError'?
// Handle error
},
)
Expand Down Expand Up @@ -204,8 +208,8 @@
```dart
CometChatMessageComposer(
user: user,
placeholderText: "Type a message...",

Check warning on line 211 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L211

Did you really mean 'placeholderText'?
disableMentions: true,

Check warning on line 212 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L212

Did you really mean 'disableMentions'?
)
```
</Tab>
Expand Down Expand Up @@ -245,7 +249,7 @@
| `aiIcon` | `Widget?` | `null` | `attachmentIcon` custom ai icon |
| `aiIconURL` | `String?` | `null` | `aiIconURL` path of the icon to show in the ai button |
| `aiIconPackageName` | `String?` | `null` | `aiIconPackageName` package name to show icon from |
| `textFormatters` | `List<CometChatTextFormatter>?` | `null` | `textFormatters` provides list of text formatters |

Check warning on line 252 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L252

Did you really mean 'formatters'?
| `disableMentions` | `bool?` | `null` | Disables mentions in the composer. |
| `textEditingController` | `TextEditingController?` | `null` | Controls the state of the text field. |
| `padding` | `EdgeInsetsGeometry?` | `null` | `padding` provides padding to the message composer |
Expand Down Expand Up @@ -284,13 +288,13 @@
| `onKeyboardDiagnostics` | `CometChatKeyboardDiagnosticsCallback?` | `null` | Debug hook fired on every internal keyboard-state change. Leave `null` in production. |
| `enableMultipleAttachments` | `bool` | `true` | `enableMultipleAttachments` when true (the default) the composer owns a multi-attachment staging tray: picked files upload immediately, stage as tray tiles, and send as one message per… |
| `attachmentTrayController` | `AttachmentTrayController?` | `null` | Optional external staging tray controller. |
| `onAttachmentTrayAdd` | `VoidCallback?` | `null` | Invoked by the tray's Add affordance when `attachmentTrayController` is set. |

Check warning on line 291 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L291

Did you really mean 'affordance'?
| `onAttachmentTraySend` | `VoidCallback?` | `null` | Invoked by the tray's Send affordance (shown only when the tray can send). |

Check warning on line 292 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L292

Did you really mean 'affordance'?
| `disableImagePaste` | `bool` | `false` | `disableImagePaste` disables staging an image pasted from the clipboard (context-menu Paste, Cmd/Ctrl+V, and the web paste event). |
| `disableDragAndDrop` | `bool` | `false` | `disableDragAndDrop` disables staging files dragged onto the chat and the "drop files here" overlay (web only). |
| `attachmentErrorAlertStyle` | `CometChatAttachmentErrorAlertStyle?` | `null` | `attachmentErrorAlertStyle` styles every attachment error alert: the toast shown when a selection is over the count/size limit, and the alert stating why a staged attachment was rejected… |
| `attachmentErrorSnackBarBuilder` | `SnackBar Function(BuildContext context, AttachmentTile tile)?` | `null` | `attachmentErrorSnackBarBuilder` fully replaces the default error snackbar. |

Check warning on line 296 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L296

Did you really mean 'snackbar'?
| `onAttachmentErrorTap` | `void Function(BuildContext context, AttachmentTile tile)?` | `null` | `onAttachmentErrorTap` fully overrides the tap/hover action on an errored tile (skips showing the default/custom snackbar entirely). |

Check warning on line 297 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L297

Did you really mean 'errored'?

Check warning on line 297 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L297

Did you really mean 'snackbar'?

***

Expand All @@ -303,7 +307,7 @@
```dart
CometChatMessageComposer(
user: user,
textFormatters: [

Check warning on line 310 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L310

Did you really mean 'textFormatters'?
CometChatMentionsFormatter(
style: CometChatMentionsStyle(
mentionSelfTextBackgroundColor: Color(0xFFF76808),
Expand All @@ -327,7 +331,7 @@
```dart
CometChatMessageComposer(
user: user,
attachmentOptions: (context, user, group, id) {

Check warning on line 334 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L334

Did you really mean 'attachmentOptions'?
return <CometChatMessageComposerAction>[
CometChatMessageComposerAction(
id: "Custom Option",
Expand Down Expand Up @@ -357,7 +361,7 @@
children: [
IconButton(
icon: Icon(Icons.location_pin, color: Color(0xFF6852D6)),
onPressed: () {

Check warning on line 364 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L364

Did you really mean 'onPressed'?
// Handle location sharing
},
),
Expand Down Expand Up @@ -507,7 +511,7 @@
],
);
},
onRichTextFormatApplied: (formatType) {

Check warning on line 514 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L514

Did you really mean 'formatType'?
debugPrint('Applied ${formatType.name}');
},
)
Expand All @@ -519,7 +523,7 @@

*Available since v6.1.1*

`richTextToolbarActions` appends your own buttons at the trailing end of the built-in toolbar — after the format buttons, separated by a divider — without replacing the toolbar the way `richTextToolbarView` does. It takes the same `ComposerActionsBuilder` shape as `attachmentOptions` and returns a list of `CometChatMessageComposerAction` items. Each action renders as an icon button, with its `title` as the tooltip.

Check warning on line 526 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L526

Did you really mean 'tooltip'?

For toolbar actions, set the action's `onToolbarTap` callback. It receives the `BuildContext` and the composer's active `TextEditingController`, so the action can read the current text and selection and mutate the draft — the composer stays the owner of the field. The toolbar calls only `onToolbarTap`; an action's `onItemClick` and `style` are not used here.

Expand All @@ -530,7 +534,7 @@
user: user,
richTextToolbarActions: (context, user, group, id) => [
CometChatMessageComposerAction(
id: 'insert_greeting',

Check warning on line 537 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L537

Did you really mean 'insert_greeting'?
title: 'Greeting',
icon: const Icon(Icons.waving_hand_outlined),
onToolbarTap: (context, controller) {
Expand Down Expand Up @@ -598,7 +602,7 @@

### Limits and Validation

Limits come from your app's settings in the [CometChat dashboard](https://app.cometchat.com) and are read at runtime — the UI Kit does not hardcode them.

Check warning on line 605 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L605

Did you really mean 'hardcode'?

| Limit | Setting | Behaviour |
| --- | --- | --- |
Expand All @@ -609,7 +613,7 @@
Error tiles come in two flavours and behave differently:

* **Failed** (network dropped) — tap the tile to **retry** it in place.
* **Rejected** (too large, wrong type, over the count) — not retryable; tapping explains why, and you remove the tile.

Check warning on line 616 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L616

Did you really mean 'retryable'?

Sending is blocked while any tile is uploading **or** in error, so a caption can never go out while its attachments are still in flight.

Expand Down Expand Up @@ -658,9 +662,9 @@
user: user,
// Styles the alert shown when a selection is over the count limit.
attachmentErrorAlertStyle: CometChatAttachmentErrorAlertStyle(),
// Replace the default error snackbar entirely.

Check warning on line 665 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L665

Did you really mean 'snackbar'?
attachmentErrorSnackBarBuilder: (context, tile) => MySnackBar(tile),
// Called when the user taps an error tile (skips the snackbar).

Check warning on line 667 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L667

Did you really mean 'snackbar'?
onAttachmentErrorTap: (context, tile) {},
)
```
Expand All @@ -678,8 +682,8 @@
| `disableImagePaste` | `bool` | Turns off clipboard paste. Defaults to `false`. |
| `disableDragAndDrop` | `bool` | Turns off drag-and-drop on web. Defaults to `false`. |
| `errorAlertStyle` | `CometChatErrorAlertStyle?` | Styles the over-limit toast. |
| `attachmentErrorSnackBarStyle` | `CometChatAttachmentErrorSnackBarStyle?` | Styles the error-tile snackbar. |

Check warning on line 685 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L685

Did you really mean 'snackbar'?
| `attachmentErrorSnackBarBuilder` | `Widget Function(BuildContext, AttachmentTile)?` | Replaces the error snackbar. |

Check warning on line 686 in ui-kit/flutter/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-composer.mdx#L686

Did you really mean 'snackbar'?
| `onAttachmentErrorTap` | `Function(AttachmentTile)?` | Called when an error tile is tapped. |

For the upload API underneath the tray, see [Upload Files & Send Attachments](/sdk/flutter/upload-files).
Expand Down
7 changes: 6 additions & 1 deletion ui-kit/flutter/message-list.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Message List"
description: "Scrollable list of messages for a conversation with real-time updates, reactions, threaded replies, and message actions."

Check warning on line 3 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L3

Did you really mean 'Scrollable'?
---

<Accordion title="AI Integration Quick Reference">
Expand All @@ -10,20 +10,20 @@
| Component | `CometChatMessageList` |
| Package | `cometchat_chat_uikit` |
| Import | `import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';` |
| Purpose | Scrollable list of messages for a conversation with real-time updates, reactions, threaded replies, and message actions. |

Check warning on line 13 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L13

Did you really mean 'Scrollable'?
| Data props | `user` · `group` · `messagesRequestBuilder` · `templates` · `addTemplate` · `parentMessageId` · `reactionsRequestBuilder` |
| Actions | `onError` · `onLoad` · `onEmpty` · `onThreadRepliesClick` · `addMoreReactionTap` · `onReactionClick` · `onReactionLongPress` · `onReactionListItemClick` — [details](#actions-and-events) |
| View slots | `headerView` · `footerView` · `loadingStateView` · `emptyStateView` · `errorStateView` · `emptyChatGreetingView` — [details](#custom-view-slots) |
| Styling | `style` — the app `ThemeData` does not reach inside a kit widget, so scope colours here. |
| Layout | Fills its parent — place it in an `Expanded` (or a sized box) inside a `Column`, or layout throws an unbounded-height error at render. |
| Custom message types | Use `addTemplate:` — **never** `templates:`. `addTemplate` merges your `CometChatMessageTemplate` with the defaults **and** folds its type/category into the list's fetch + realtime filter; `templates` replaces the default set and only registers the bubble, so a custom type sends fine and **never appears**, with no error. A hand-rolled `MessagesRequestBuilder` does not help — the list always overrides `uid`/`guid`/`types`/`categories` on it. |

Check warning on line 19 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L19

Did you really mean 'realtime'?
| Stitching | Pair with `CometChatMessageHeader` and `CometChatMessageComposer`, passing the same `user` or `group` to all three. |
| Prerequisites | `CometChatUIKit` initialised and a user logged in. |
| Full props | [89 props](#functionality) |
| Full props | [90 props](#functionality) |

</Accordion>

`CometChatMessageList` renders a scrollable list of messages for a conversation with real-time updates for new messages, edits, deletions, reactions, and threaded replies.

Check warning on line 26 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L26

Did you really mean 'scrollable'?

---

Expand Down Expand Up @@ -76,6 +76,10 @@

Prerequisites: CometChat SDK initialized with `CometChatUIKit.init()`, a user logged in, and the UI Kit dependency added.

<Note>
With [offline support](/ui-kit/flutter/offline-support) on, the list shows saved messages at once, marks own messages that are waiting to send (**Not sent yet**) or failed (**Not sent. Tap to retry**, with Retry and Delete), and shows **Connect to load more** where older messages need a connection. See [Message list and threads](/ui-kit/flutter/offline-support#message-list-and-threads).
</Note>

<Warning>
Simply adding the `MessageList` component to the layout will only display the loading indicator. You must supply a `User` or `Group` object to fetch messages.
</Warning>
Expand Down Expand Up @@ -136,7 +140,7 @@
```dart
CometChatMessageList(
user: user,
onError: (e) {

Check warning on line 143 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L143

Did you really mean 'onError'?
debugPrint("Error: $e");
},
)
Expand All @@ -153,7 +157,7 @@
```dart
CometChatMessageList(
user: user,
onLoad: (messages) {

Check warning on line 160 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L160

Did you really mean 'onLoad'?
debugPrint("Loaded ${messages.length}");
},
)
Expand All @@ -170,7 +174,7 @@
```dart
CometChatMessageList(
user: user,
onEmpty: () {

Check warning on line 177 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L177

Did you really mean 'onEmpty'?
debugPrint("No messages");
},
)
Expand Down Expand Up @@ -224,8 +228,8 @@
| `onMessagesDelivered` / `onMessagesRead` | Updates receipt status via ValueNotifier |
| `onTypingStarted` / `onTypingEnded` | Updates typing indicator |
| `onMessageReactionAdded` / `onMessageReactionRemoved` | Updates reaction counts |
| `onMessagePinned` / `onMessageUnpinned` | Restamps the message's pin state in place |

Check warning on line 231 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L231

Did you really mean 'Restamps'?
| `onMessageSaved` / `onMessageUnsaved` | Restamps the message's saved state (the logged-in user's devices only) |

Check warning on line 232 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L232

Did you really mean 'Restamps'?
| Connection reconnected | Triggers silent sync to fetch missed messages |

---
Expand All @@ -239,7 +243,7 @@
| `messageListBloc` | `MessageListBloc?` | `null` | Optional external `MessageListBloc` instance. |
| `messagesRequestBuilder` | `MessagesRequestBuilder?` | `null` | Request builder used to fetch the message list. Note the widget always overrides `uid`, `guid`, `types` and `categories` on whatever builder you pass. |
| `templates` | `List<CometChatMessageTemplate>?` | `null` | REPLACES the default message templates. For a message type of your own use `addTemplate` instead — `templates` only registers the bubble and does not widen the fetch filter, so a custom type sends successfully and never appears. |
| `addTemplate` | `List<CometChatMessageTemplate>?` | `null` | Merges templates with the defaults. Each template's type and category are also folded into the list's fetch and realtime filter, which is what makes a custom message type actually render. |

Check warning on line 246 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L246

Did you really mean 'realtime'?
| `parentMessageId` | `int?` | `null` | Parent message ID for thread replies |
| `withParent` | `bool` | `true` | Whether to include the parent message in thread results (default: false). Set to true for AI chat history where the parent message should appear in the list. |
| `hideDeletedMessages` | `bool` | `false` | Hide deleted messages entirely |
Expand All @@ -249,7 +253,7 @@
| `headerView` | `HeaderFooterBuilder?` | `null` | Custom header view displayed above the message list. **Validates: Requirements 13.2** |
| `footerView` | `HeaderFooterBuilder?` | `null` | Custom footer view displayed below the message list. **Validates: Requirements 13.2** |
| `loadingStateView` | `WidgetBuilder?` | `null` | `loadingStateView` is a parameter used to show the loading state view in case of loading |
| `emptyStateView` | `WidgetBuilder?` | `null` | `emptyStateView` returns view fow empty state |

Check warning on line 256 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L256

Did you really mean 'fow'?
| `errorStateView` | `WidgetBuilder?` | `null` | `errorStateView` is a parameter used to show the error state view in case of any error |
| `emptyChatGreetingView` | `WidgetBuilder?` | `null` | View shown in an empty conversation, in place of the generic empty state. |
| `style` | `CometChatMessageListStyle?` | `null` | Style configuration for the message list. |
Expand All @@ -258,14 +262,14 @@
| `onError` | `OnError?` | `null` | `onError` callback triggered in case any error happens when fetching data |
| `onLoad` | `OnLoad<BaseMessage>?` | `null` | Called once the first page of messages has loaded. |
| `onEmpty` | `OnEmpty?` | `null` | `onEmpty` callback triggered when the list is empty |
| `stateCallBack` | `Function(CometChatMessageListControllerProtocol controller)?` | `null` | Exposes the widget's state so a host can drive it imperatively. |

Check warning on line 265 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L265

Did you really mean 'widget's'?
| `controller` | `CometChatMessageListController?` | `null` | Lets the host jump the list to a message after it has mounted. See [Jump to a message](#jump-to-a-message). *Available since v6.1.1.* |
| `customSoundForMessages` | `String?` | `null` | `customSoundForMessages` set custom sound for messages |
| `customSoundForMessagePackage` | `String?` | `null` | `customSoundForMessagePackage` package name to show icon from |
| `readIcon` | `Widget?` | `null` | `readIcon` widget visible when readAt != null in `BaseMessage`. If blank will load default readIcon |

Check warning on line 269 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L269

Did you really mean 'readAt'?

Check warning on line 269 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L269

Did you really mean 'readIcon'?
| `deliveredIcon` | `Widget?` | `null` | `deliveredIcon` widget visible while deliveredAt != null in `BaseMessage`. If blank will load default deliveredIcon |

Check warning on line 270 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L270

Did you really mean 'deliveredAt'?

Check warning on line 270 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L270

Did you really mean 'deliveredIcon'?
| `sentIcon` | `Widget?` | `null` | `sentIcon` widget visible while sentAt != null and deliveredAt is null in `BaseMessage`. If blank will load default sentIcon |

Check warning on line 271 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L271

Did you really mean 'sentAt'?

Check warning on line 271 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L271

Did you really mean 'deliveredAt'?

Check warning on line 271 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L271

Did you really mean 'sentIcon'?
| `waitIcon` | `Widget?` | `null` | `waitIcon` widget visible while sentAt and deliveredAt is null in `BaseMessage`. If blank will load default waitIcon |

Check warning on line 272 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L272

Did you really mean 'sentAt'?

Check warning on line 272 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L272

Did you really mean 'deliveredAt'?

Check warning on line 272 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L272

Did you really mean 'waitIcon'?
| `avatarVisibility` | `bool?` | `true` | Toggle avatar visibility |
| `enableMultipleAttachments` | `bool` | `true` | Render multi-attachment media messages as grouped per-type bubbles. See [Multiple Attachments](#multiple-attachments) |
| `hideTimestamp` | `bool?` | `null` | Toggle timestamp visibility |
Expand All @@ -279,7 +283,7 @@
| `receiptsVisibility` | `bool?` | `true` | Toggle read receipts |
| `disableReactions` | `bool?` | `false` | Toggle reactions |
| `addReactionIcon` | `Widget?` | `null` | `addReactionIcon` sets custom icon for adding reaction |
| `addMoreReactionTap` | `Function(BaseMessage message)?` | `null` | Called when the 'add reaction' affordance is tapped. |

Check warning on line 286 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L286

Did you really mean 'affordance'?
| `favoriteReactions` | `List<String>?` | `null` | `favoriteReactions` is a list of frequently used reactions |
| `onReactionClick` | `Function(String? emoji, BaseMessage message)?` | `null` | Called when an existing reaction chip is tapped. |
| `onReactionLongPress` | `Function(String? emoji, BaseMessage message)?` | `null` | Called when an existing reaction chip is long-pressed. |
Expand All @@ -290,8 +294,8 @@
| `disableMentions` | `bool?` | `null` | `disableMentions` disables mentions in the composer |
| `mentionAllLabel` | `String?` | `null` | `mentionAllLabel` is the label to display for @all mention (default: localized "Notify All") |
| `mentionAllLabelId` | `String?` | `null` | `mentionAllLabelId` is the ID for @all mention (default: "all") |
| `padding` | `EdgeInsetsGeometry?` | `null` | `padding` sets the padding for snackBar |

Check warning on line 297 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L297

Did you really mean 'snackBar'?
| `margin` | `EdgeInsetsGeometry?` | `null` | `margin` sets the margin for snackBar |

Check warning on line 298 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L298

Did you really mean 'snackBar'?
| `width` | `double?` | `null` | `width` provides width to the widget |
| `height` | `double?` | `null` | `height` provides height to the widget |
| `hideCopyMessageOption` | `bool?` | `false` | `hideCopyMessageOption` This prop defines whether a user can copy message or not. |
Expand All @@ -305,7 +309,8 @@
| `hideReplyOption` | `bool?` | `false` | `hideReplyOption` This prop defines whether the inline Reply option should be visible or not. |
| `hideTranslateMessageOption` | `bool?` | `false` | `hideTranslateMessageOption` This prop defines whether Reply In Thread option should be visible or not. |
| `hideShareMessageOption` | `bool?` | `false` | `hideShareMessageOption` This prop defines whether share option should be visible or not. |
| `hideModerationView` | `bool?` | `null` | When true, hides the moderation affordance on bubbles. |

Check warning on line 312 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L312

Did you really mean 'affordance'?
| `hideOfflineNotices` | `bool` | `false` | With [offline support](/ui-kit/flutter/offline-support#hide-the-offline-notices) running, hides the offline notices this list shows, such as **Too many messages waiting to send**. The **Not sent** rows and offline states still show. No effect with offline support off |
| `enableConversationStarters` | `bool?` | `false` | When true, shows AI conversation starters in an empty conversation. |
| `enableSmartReplies` | `bool?` | `false` | When true, shows AI smart replies beneath the list. |
| `smartRepliesDelayDuration` | `int?` | `10000` | Milliseconds to wait after the last message before smart replies appear. |
Expand All @@ -320,7 +325,7 @@
| `showMarkAsUnreadOption` | `bool` | `false` | Show "Mark as Unread" in long-press options |
| `startFromUnreadMessages` | `bool` | `false` | Scroll to first unread on open |
| `hideFlagOption` | `bool` | `false` | Hide the Flag/Report option from message long-press actions |
| `flagReasonLocalizer` | `String Function(String reasonId)?` | `null` | Custom localizer that converts a flag-reason ID into a display string |

Check warning on line 328 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L328

Did you really mean 'localizer'?
| `hideFlagRemarkField` | `bool` | `false` | Hide the optional remark/context text field in the flag dialog |
| `loadLastAgentConversation` | `bool` | `false` | Loads the most recent existing agent conversation on start |

Expand All @@ -339,7 +344,7 @@
```dart
CometChatMessageList(
user: user,
headerView: (context, {user, group, parentMessageId}) {

Check warning on line 347 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L347

Did you really mean 'headerView'?
return Container(
padding: EdgeInsets.all(8),
child: Text("Pinned Messages"),
Expand All @@ -359,7 +364,7 @@
```dart
CometChatMessageList(
user: user,
footerView: (context, {user, group, parentMessageId}) {

Check warning on line 367 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L367

Did you really mean 'footerView'?
return Container(
padding: EdgeInsets.all(8),
child: Text("End of messages"),
Expand All @@ -386,14 +391,14 @@
</Tab>
</Tabs>

### Text Formatters (Mentions)

Check warning on line 394 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L394

Did you really mean 'Formatters'?

<Tabs>
<Tab title="Dart">
```dart
CometChatMessageList(
user: user,
textFormatters: [

Check warning on line 401 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L401

Did you really mean 'textFormatters'?
CometChatMentionsFormatter(),
],
)
Expand All @@ -417,11 +422,11 @@
// Add/override specific templates (merged with defaults)
CometChatMessageList(
user: user,
addTemplate: [

Check warning on line 425 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L425

Did you really mean 'addTemplate'?
CometChatMessageTemplate(
type: MessageTypeConstants.text,
category: MessageCategoryConstants.message,
contentView: (message, context, alignment, {additionalConfigurations}) {

Check warning on line 429 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L429

Did you really mean 'contentView'?
return Text((message as TextMessage).text,
style: TextStyle(color: Colors.red));
},
Expand Down Expand Up @@ -540,7 +545,7 @@
| `hidePinMessageOption` | `false` | Hide "Pin message" (shown while the message is unpinned). *Available since v6.1.1.* |
| `hideUnpinMessageOption` | `false` | Hide "Unpin message" (shown while the message is pinned). *Available since v6.1.1.* |
| `hideSaveMessageOption` | `false` | Hide "Save message" (shown while the message is unsaved). *Available since v6.1.1.* |
| `hideUnsaveMessageOption` | `false` | Hide "Unsave message" (shown while the message is saved). *Available since v6.1.1.* |

Check warning on line 548 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L548

Did you really mean 'Unsave'?
| `hideThreadSubscriptionOption` | `false` | Hide "Subscribe to thread" / "Unsubscribe from thread". Only shown when `UIKitSettings.enableThreadSubscription` is on — see the [Thread Subscription guide](/ui-kit/flutter/guide-thread-subscription). *Available since v6.1.1.* |
| `hideMessagePrivatelyOption` | `false` | Hide "Message Privately" |
| `hideReactionOption` | `false` | Hide "Reaction" |
Expand Down Expand Up @@ -621,7 +626,7 @@
// hide the optional "Remark" text field in the flag dialog
hideFlagRemarkField: false,
// localize reason IDs to your own display strings
flagReasonLocalizer: (reasonId) {

Check warning on line 629 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L629

Did you really mean 'reasonId'?
switch (reasonId) {
case 'spam':
return 'Spam or unsolicited';
Expand All @@ -640,7 +645,7 @@

*Available since v6.1.1*

With the features enabled, the action menu offers **Pin message** / **Unpin message** and **Save message** / **Unsave message**, the label following the message's current state. They are wired to the SDK's [Pin A Message](/sdk/flutter/pin-message) and [Save A Message](/sdk/flutter/save-message) APIs — no setup is needed:

Check warning on line 648 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L648

Did you really mean 'Unsave'?

- The options appear on any sent, non-deleted message, thread replies included. They are withheld from deleted messages, messages not yet sent or still pending moderation, your own messages that moderation disapproved, and group action messages, and they hide themselves when `CometChat.isPinMessageEnabled()` / `CometChat.isSaveMessageEnabled()` returns `false`.
- **Pin permission is enforced by the server, not the UI Kit.** The Pin / Unpin option is shown to every participant; a user who lacks permission gets a "You don't have permission to perform this action." toast when they tap it. Save has no role gate.
Expand Down Expand Up @@ -675,11 +680,11 @@
<Tabs>
<Tab title="Dart">
```dart
final _controller = CometChatMessageListController();

Check warning on line 683 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L683

Did you really mean '_controller'?

CometChatMessageList(
user: user,
controller: _controller,

Check warning on line 687 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L687

Did you really mean '_controller'?
)

// later — e.g. from CometChatPinnedMessages.onItemTap
Expand Down Expand Up @@ -732,7 +737,7 @@

### Extending MessageListBloc

`MessageListBloc` uses the `ListBase<BaseMessage>` mixin with override hooks:

Check warning on line 740 in ui-kit/flutter/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/message-list.mdx#L740

Did you really mean 'mixin'?

<Tabs>
<Tab title="Dart">
Expand Down
20 changes: 20 additions & 0 deletions ui-kit/flutter/methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@

| Method | Type | Description |
|---|---|---|
| appId | String | Sets the unique ID for the app, available on dashboard |

Check warning on line 35 in ui-kit/flutter/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/methods.mdx#L35

Did you really mean 'appId'?
| region | String | Sets the region for the app ('us' or 'eu' or 'in') |

Check warning on line 36 in ui-kit/flutter/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/methods.mdx#L36

Did you really mean 'eu'?
| authKey | String | Sets the auth key for the app, available on dashboard |

Check warning on line 37 in ui-kit/flutter/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/methods.mdx#L37

Did you really mean 'authKey'?
| subscriptionType | String | Sets subscription type for tracking the presence of all users |

Check warning on line 38 in ui-kit/flutter/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/methods.mdx#L38

Did you really mean 'subscriptionType'?
| roles | String | Sets subscription type for tracking the presence of users with specified roles |
| autoEstablishSocketConnection | Boolean | Configures if web socket connections will be established automatically on app initialization or be done manually, set to true by default |
| enableCalls | Boolean | Turns on calling: `init()` initializes the Calls SDK and `login()` logs the user into it. Default `false`. See [Calling Integration](/ui-kit/flutter/calling-integration) |

Check warning on line 41 in ui-kit/flutter/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/methods.mdx#L41

Did you really mean 'enableCalls'?
| callingConfiguration | CallingConfiguration | Settings for the call buttons, the outgoing call screen and group calls |

Check warning on line 42 in ui-kit/flutter/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/methods.mdx#L42

Did you really mean 'callingConfiguration'?
| callPushBridge | CometChatCallPushBridge | Connects the UI Kit to the app's push ringer (`cometchat_voip`), so calls answered on the ring screen join on the UI Kit's call screen. Required for incoming calls on Android and iOS; not used on web |
| offlineConfig | OfflineConfig | Turns on [offline support](/ui-kit/flutter/offline-support) (UI Kit 6.4.0 and Chat SDK 5.1.2 or later). Pass `OfflineConfig(enabled: true)`. Default: off |

Check warning on line 44 in ui-kit/flutter/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/methods.mdx#L44

Did you really mean 'offlineConfig'?

> **V6 Note:** The `extensions` and `aiFeature` parameters from V5 have been removed. Extensions are built-in and handled automatically by `MessageTemplateUtils`. No registration is needed.

Expand All @@ -64,6 +65,19 @@
);
```

#### Init with offline support

Set `offlineConfig` to keep chats and messages available without a connection and to queue messages sent while offline. It is off by default. The UI Kit hands it to the Chat SDK. Offline support runs only after a user logs in; check `CometChat.isOfflineEnabled()` to see whether it is running. See [Offline Support](/ui-kit/flutter/offline-support).

```dart
UIKitSettings uiKitSettings = (UIKitSettingsBuilder()
..region = "your_region"
..appId = "your_appID"
..authKey = "your_authKey"
..offlineConfig = const OfflineConfig(enabled: true)
).build();
```

## Login using Auth Key

Only the UID of a user is needed to log in. This simple authentication procedure is useful when you are creating a POC or if you are in the development phase. For production apps, we suggest you use AuthToken instead of Auth Key.
Expand Down Expand Up @@ -96,8 +110,10 @@

Before a new user logs in, it is crucial to clean session data to avoid potential conflicts. This can be achieved by invoking the `.logout()` function.

With calls enabled, `logout()` first declines a call still ringing, cancels an outgoing call still ringing and leaves a call in progress, then logs out of the Chat SDK and the Calls SDK. Unregister the push token with `CometChatVoip.unregisterPushToken()` before calling it. Use `CometChatUIKit.logout`, not `CometChat.logout`, which does none of the calling clean-up.

Check warning on line 113 in ui-kit/flutter/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/methods.mdx#L113

Did you really mean 'Unregister'?

With [offline support](/ui-kit/flutter/offline-support) running, logout also deletes the user's offline cache on the device: cached chats and messages, cached media and messages still waiting to be sent. The UI Kit clears its lists. See [Logout and user switch](/ui-kit/flutter/offline-support#logout-and-user-switch).

```dart
CometChatUIKit.logout(onSuccess: (s) {
// Logged out successfully
Expand Down Expand Up @@ -156,6 +172,10 @@
});
```

<Note>
With [offline support](/ui-kit/flutter/offline-support) running, a message sent without a connection is queued on the device and sent when the connection returns. The future returned by `sendTextMessage`, `sendMediaMessage` and `sendCustomMessage` completes with the sent message when it reaches the server, also after it was queued, and `onError` is not called just because it was queued. See [Send method futures](/ui-kit/flutter/offline-support#send-method-futures).
</Note>

## Interactive Message

### Form Message
Expand Down Expand Up @@ -245,12 +265,12 @@
```

<Note>
The UIKit's `CometChatMessageList` automatically handles AI events internally. Use `CometChatAIAssistantEvents` only if you need additional custom UI reactions to AI streaming events.

Check warning on line 268 in ui-kit/flutter/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/methods.mdx#L268

Did you really mean 'UIKit's'?
</Note>

## UI Events for Card Actions

When a user interacts with a card button inside an AI agent response or a standalone card message, the UIKit emits a `ccCardActionClicked` event:

Check warning on line 273 in ui-kit/flutter/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/flutter/methods.mdx#L273

Did you really mean 'UIKit'?

```dart
CometChatUIEvents.addUiListener("card_listener", myUIListener);
Expand Down
Loading