@cometchat/skills 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/bin/install.js +27 -0
- package/package.json +14 -1
- package/skills/cometchat/SKILL.md +233 -69
- package/skills/cometchat/references/asking-questions.md +48 -0
- package/skills/cometchat-a11y/SKILL.md +3 -2
- package/skills/cometchat-android-v5/SKILL.md +2 -1
- package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
- package/skills/cometchat-android-v5-calls/references/README.md +1 -1
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
- package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
- package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
- package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
- package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
- package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
- package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
- package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
- package/skills/cometchat-android-v5-components/SKILL.md +4 -3
- package/skills/cometchat-android-v5-core/SKILL.md +5 -3
- package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
- package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
- package/skills/cometchat-android-v5-features/SKILL.md +5 -4
- package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
- package/skills/cometchat-android-v5-production/SKILL.md +2 -1
- package/skills/cometchat-android-v5-push/SKILL.md +2 -3
- package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
- package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
- package/skills/cometchat-android-v6/SKILL.md +2 -1
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
- package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
- package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
- package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
- package/skills/cometchat-android-v6-core/SKILL.md +208 -28
- package/skills/cometchat-android-v6-events/SKILL.md +4 -1
- package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
- package/skills/cometchat-android-v6-features/SKILL.md +26 -2
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
- package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
- package/skills/cometchat-android-v6-production/SKILL.md +6 -3
- package/skills/cometchat-android-v6-push/SKILL.md +43 -2
- package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
- package/skills/cometchat-angular-calls/SKILL.md +256 -389
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
- package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
- package/skills/cometchat-angular-calls/references/call-session.md +2 -2
- package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
- package/skills/cometchat-angular-calls/references/device-management.md +53 -34
- package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
- package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
- package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
- package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
- package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
- package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
- package/skills/cometchat-angular-components/SKILL.md +149 -620
- package/skills/cometchat-angular-core/SKILL.md +232 -312
- package/skills/cometchat-angular-customization/SKILL.md +415 -223
- package/skills/cometchat-angular-features/SKILL.md +216 -334
- package/skills/cometchat-angular-patterns/SKILL.md +168 -359
- package/skills/cometchat-angular-placement/SKILL.md +189 -560
- package/skills/cometchat-angular-production/SKILL.md +241 -92
- package/skills/cometchat-angular-push/SKILL.md +280 -294
- package/skills/cometchat-angular-testing/SKILL.md +430 -158
- package/skills/cometchat-angular-theming/SKILL.md +190 -265
- package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
- package/skills/cometchat-astro-patterns/SKILL.md +2 -1
- package/skills/cometchat-calls/SKILL.md +25 -19
- package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
- package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
- package/skills/cometchat-calls/references/use-case-support.md +3 -4
- package/skills/cometchat-calls/references/use-case-team.md +23 -12
- package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
- package/skills/cometchat-components/SKILL.md +163 -25
- package/skills/cometchat-core/SKILL.md +255 -19
- package/skills/cometchat-customization/SKILL.md +50 -25
- package/skills/cometchat-features/SKILL.md +313 -34
- package/skills/cometchat-flutter-v5/SKILL.md +10 -4
- package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
- package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
- package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
- package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
- package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6/SKILL.md +17 -16
- package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
- package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
- package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
- package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
- package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
- package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
- package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
- package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
- package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
- package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
- package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
- package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
- package/skills/cometchat-i18n/SKILL.md +139 -78
- package/skills/cometchat-ios/SKILL.md +4 -2
- package/skills/cometchat-ios-calls/SKILL.md +225 -95
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
- package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
- package/skills/cometchat-ios-calls/references/call-session.md +51 -54
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
- package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
- package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
- package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
- package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
- package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
- package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
- package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
- package/skills/cometchat-ios-components/SKILL.md +200 -12
- package/skills/cometchat-ios-core/SKILL.md +173 -45
- package/skills/cometchat-ios-customization/SKILL.md +276 -110
- package/skills/cometchat-ios-features/SKILL.md +64 -36
- package/skills/cometchat-ios-placement/SKILL.md +15 -12
- package/skills/cometchat-ios-production/SKILL.md +12 -4
- package/skills/cometchat-ios-push/SKILL.md +53 -19
- package/skills/cometchat-ios-testing/SKILL.md +14 -9
- package/skills/cometchat-ios-theming/SKILL.md +39 -3
- package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
- package/skills/cometchat-native-bare-patterns/SKILL.md +34 -17
- package/skills/cometchat-native-calls/SKILL.md +28 -16
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
- package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
- package/skills/cometchat-native-calls/references/call-session.md +2 -2
- package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
- package/skills/cometchat-native-calls/references/device-management.md +53 -30
- package/skills/cometchat-native-calls/references/group-calls.md +35 -30
- package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
- package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
- package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
- package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
- package/skills/cometchat-native-calls/references/share-invite.md +7 -5
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
- package/skills/cometchat-native-components/SKILL.md +84 -52
- package/skills/cometchat-native-core/SKILL.md +101 -32
- package/skills/cometchat-native-customization/SKILL.md +150 -28
- package/skills/cometchat-native-expo-patterns/SKILL.md +57 -26
- package/skills/cometchat-native-features/SKILL.md +23 -16
- package/skills/cometchat-native-placement/SKILL.md +19 -10
- package/skills/cometchat-native-production/SKILL.md +9 -3
- package/skills/cometchat-native-push/SKILL.md +2 -1
- package/skills/cometchat-native-testing/SKILL.md +1 -2
- package/skills/cometchat-native-theming/SKILL.md +54 -29
- package/skills/cometchat-native-troubleshooting/SKILL.md +9 -3
- package/skills/cometchat-nextjs-patterns/SKILL.md +20 -6
- package/skills/cometchat-placement/SKILL.md +42 -3
- package/skills/cometchat-production/SKILL.md +12 -5
- package/skills/cometchat-react-calls/SKILL.md +220 -10
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
- package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
- package/skills/cometchat-react-calls/references/call-session.md +1 -1
- package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
- package/skills/cometchat-react-calls/references/device-management.md +55 -51
- package/skills/cometchat-react-calls/references/group-calls.md +18 -23
- package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
- package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
- package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
- package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
- package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
- package/skills/cometchat-react-calls/references/share-invite.md +4 -5
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
- package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
- package/skills/cometchat-react-patterns/SKILL.md +44 -4
- package/skills/cometchat-react-push/SKILL.md +258 -72
- package/skills/cometchat-react-router-patterns/SKILL.md +10 -4
- package/skills/cometchat-react-testing/SKILL.md +14 -5
- package/skills/cometchat-theming/SKILL.md +181 -18
- package/skills/cometchat-troubleshooting/SKILL.md +40 -20
|
@@ -6,14 +6,15 @@ description: >
|
|
|
6
6
|
listener leaks, theme jank, and platform-specific build errors. Use when seeing
|
|
7
7
|
errors, crashes, or unexpected behavior with CometChat components.
|
|
8
8
|
license: "MIT"
|
|
9
|
-
compatibility: "cometchat_chat_uikit ^6.0.
|
|
10
|
-
allowed-tools: "shell, file-read, file-search, file-list, grep"
|
|
9
|
+
compatibility: "cometchat_chat_uikit ^6.0.1"
|
|
11
10
|
metadata:
|
|
12
11
|
author: "CometChat"
|
|
13
12
|
version: "3.0.0"
|
|
14
13
|
tags: "cometchat flutter troubleshooting errors debugging crashes fixes"
|
|
15
14
|
---
|
|
16
15
|
|
|
16
|
+
> **Ground truth:** `cometchat_chat_uikit: ^6.0` — pub-cache source + `ui-kit/flutter`. **Official docs:** https://www.cometchat.com/docs/ui-kit/flutter/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
|
|
17
|
+
|
|
17
18
|
# CometChat Flutter UIKit v6 — Troubleshooting Guide
|
|
18
19
|
|
|
19
20
|
Comprehensive guide for diagnosing and fixing CometChat Flutter UIKit v6 integration problems.
|
|
@@ -34,7 +35,9 @@ What's happening?
|
|
|
34
35
|
│ └─ Go to → Section 3: UI Rendering Issues
|
|
35
36
|
│
|
|
36
37
|
├─ Calls not working, call screen blank or stuck
|
|
37
|
-
│
|
|
38
|
+
│ ├─ Outgoing screen NEVER renders (peer rings, caller shows nothing) → Section 4.7 (V6 navigatorKey trap)
|
|
39
|
+
│ ├─ Stuck on "Calling…" after peer accepts → Section 4.8 (upgrade to 6.0.1)
|
|
40
|
+
│ └─ Otherwise → Section 4: Call Issues
|
|
38
41
|
│
|
|
39
42
|
├─ Events not firing, duplicate events, memory leaks
|
|
40
43
|
│ └─ Go to → Section 5: Listener Issues
|
|
@@ -202,16 +205,17 @@ final bloc = ConversationsBloc(
|
|
|
202
205
|
|
|
203
206
|
## 3. UI Rendering Issues
|
|
204
207
|
|
|
205
|
-
### 3.1 Double keyboard compensation (layout jumps)
|
|
208
|
+
### 3.1 Double keyboard compensation (layout jumps) — PRE-6.0.1 symptom
|
|
206
209
|
|
|
207
210
|
- **Symptom**: When the keyboard opens, the message list jumps or there's extra white space. Content shifts twice — once from Flutter's Scaffold resize, once from the composer's internal keyboard handling.
|
|
208
|
-
- **Cause**:
|
|
209
|
-
- **Fix**:
|
|
211
|
+
- **Cause**: A **pre-6.0.1** kit. Before kit fix **ENG-34434**, the composer did not clamp its keyboard spacing to Flutter's `viewInsets`, so a Scaffold with `resizeToAvoidBottomInset: true` (the default) double-compensated. On `^6.0.1` the composer clamps to `viewInsets`, so `true` is correct and does NOT double-compensate.
|
|
212
|
+
- **Fix**: **Upgrade `cometchat_chat_uikit` to `^6.0.1`** and keep `resizeToAvoidBottomInset: true` (or omit it — `true` is the default). Setting `false` is only a stopgap on old kits you can't upgrade.
|
|
210
213
|
|
|
211
214
|
```dart
|
|
212
|
-
// ✅ CORRECT
|
|
215
|
+
// ✅ CORRECT on ^6.0.1 — true (or omit; true is the default). Composer clamps
|
|
216
|
+
// to viewInsets (ENG-34434), so no double-compensation.
|
|
213
217
|
Scaffold(
|
|
214
|
-
resizeToAvoidBottomInset:
|
|
218
|
+
resizeToAvoidBottomInset: true,
|
|
215
219
|
body: Column(
|
|
216
220
|
children: [
|
|
217
221
|
Expanded(child: CometChatMessageList(user: user)),
|
|
@@ -220,8 +224,10 @@ Scaffold(
|
|
|
220
224
|
),
|
|
221
225
|
)
|
|
222
226
|
|
|
223
|
-
//
|
|
227
|
+
// ⚠ PRE-6.0.1 STOPGAP ONLY — false suppresses the double gap on kits that
|
|
228
|
+
// predate the ENG-34434 clamp. Prefer upgrading the kit.
|
|
224
229
|
Scaffold(
|
|
230
|
+
resizeToAvoidBottomInset: false,
|
|
225
231
|
body: Column(
|
|
226
232
|
children: [
|
|
227
233
|
Expanded(child: CometChatMessageList(user: user)),
|
|
@@ -255,7 +261,7 @@ class _MessagesScreenState extends State<MessagesScreen> {
|
|
|
255
261
|
@override
|
|
256
262
|
Widget build(BuildContext context) {
|
|
257
263
|
return Scaffold(
|
|
258
|
-
resizeToAvoidBottomInset:
|
|
264
|
+
resizeToAvoidBottomInset: true, // ^6.0.1: composer clamps to viewInsets (ENG-34434)
|
|
259
265
|
body: Column(
|
|
260
266
|
children: [
|
|
261
267
|
Expanded(child: CometChatMessageList(user: _user, group: _group)),
|
|
@@ -345,7 +351,46 @@ Widget build(BuildContext context) {
|
|
|
345
351
|
|
|
346
352
|
- **Symptom**: Visible gap between the message composer and the keyboard when it opens.
|
|
347
353
|
- **Cause**: Safe area bottom padding being applied when the keyboard is open. The keyboard already covers the safe area, so adding safe area padding on top creates extra space.
|
|
348
|
-
- **Fix**:
|
|
354
|
+
- **Fix**: Cache `MediaQuery.paddingOf(context).bottom` once in `didChangeDependencies()`. Never wrap the composer in an extra `SafeArea` widget — `CometChatMessageComposer` already handles bottom inset internally via `SliverSpacing`:
|
|
355
|
+
|
|
356
|
+
```dart
|
|
357
|
+
// ✅ CORRECT — cache safe area once, no extra SafeArea wrapper
|
|
358
|
+
class _MessagesScreenState extends State<MessagesScreen> {
|
|
359
|
+
double _bottomSafeArea = 0;
|
|
360
|
+
|
|
361
|
+
@override
|
|
362
|
+
void didChangeDependencies() {
|
|
363
|
+
super.didChangeDependencies();
|
|
364
|
+
_bottomSafeArea = MediaQuery.paddingOf(context).bottom;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
@override
|
|
368
|
+
Widget build(BuildContext context) {
|
|
369
|
+
return Scaffold(
|
|
370
|
+
resizeToAvoidBottomInset: true, // ^6.0.1: composer clamps to viewInsets (ENG-34434)
|
|
371
|
+
body: Column(
|
|
372
|
+
children: [
|
|
373
|
+
Expanded(child: CometChatMessageList(user: widget.user)),
|
|
374
|
+
CometChatMessageComposer(user: widget.user), // No SafeArea wrapper!
|
|
375
|
+
],
|
|
376
|
+
),
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// ❌ WRONG — SafeArea wrapper adds bottom padding the composer already handles
|
|
382
|
+
Scaffold(
|
|
383
|
+
resizeToAvoidBottomInset: true,
|
|
384
|
+
body: Column(
|
|
385
|
+
children: [
|
|
386
|
+
Expanded(child: CometChatMessageList(user: widget.user)),
|
|
387
|
+
SafeArea( // ← Causes extra white gap when keyboard opens
|
|
388
|
+
child: CometChatMessageComposer(user: widget.user),
|
|
389
|
+
),
|
|
390
|
+
],
|
|
391
|
+
),
|
|
392
|
+
)
|
|
393
|
+
```
|
|
349
394
|
|
|
350
395
|
---
|
|
351
396
|
|
|
@@ -354,14 +399,60 @@ Widget build(BuildContext context) {
|
|
|
354
399
|
### 4.1 "auth token null" on call init
|
|
355
400
|
|
|
356
401
|
- **Symptom**: Calls SDK fails with `auth token null` or similar authentication error when trying to start a call.
|
|
357
|
-
- **Cause**: The Calls SDK was initialized before the Chat SDK completed init and login. The Calls SDK needs the auth token from a successful chat login.
|
|
358
|
-
- **Fix**:
|
|
402
|
+
- **Cause**: The Calls SDK was initialized before the Chat SDK completed init and login. The Calls SDK needs the auth token from a successful chat login (rule **CALLS_INIT_AFTER_CHAT_INIT** — see `cometchat-flutter-v6-calls` §1.0).
|
|
403
|
+
- **Fix**: When `..enableCalls = true` is set on `UIKitSettingsBuilder`, `CallEventService` handles both `CometChatUIKitCalls.init()` and `CometChatUIKitCalls.loginWithAuthToken()` internally — chat init must complete first. For manual integrations, gate calls init on chat init success:
|
|
404
|
+
|
|
405
|
+
```dart
|
|
406
|
+
// ✅ CORRECT — chat init first, calls init in onSuccess
|
|
407
|
+
await CometChatUIKit.init(
|
|
408
|
+
uiKitSettings: settings,
|
|
409
|
+
onSuccess: (_) async {
|
|
410
|
+
// For manual calls integration (no ..enableCalls = true):
|
|
411
|
+
// CometChatUIKitCalls.init takes raw appId + region STRINGS (not a settings
|
|
412
|
+
// builder) and reports via callbacks — verified vs cometchat_uikit_calls.dart:9.
|
|
413
|
+
CometChatUIKitCalls.init(
|
|
414
|
+
'APP_ID',
|
|
415
|
+
'us',
|
|
416
|
+
onSuccess: (_) {},
|
|
417
|
+
onError: (e) => debugPrint('Calls init failed: $e'),
|
|
418
|
+
);
|
|
419
|
+
},
|
|
420
|
+
onError: (e) => debugPrint('Chat init failed: ${e.message}'),
|
|
421
|
+
);
|
|
422
|
+
|
|
423
|
+
// ❌ WRONG — calls init runs before chat init completes
|
|
424
|
+
CometChatUIKit.init(uiKitSettings: settings); // not awaited
|
|
425
|
+
await CometChatUIKitCalls.init(callAppSettings); // auth token null
|
|
426
|
+
```
|
|
359
427
|
|
|
360
428
|
### 4.2 "session already started"
|
|
361
429
|
|
|
362
430
|
- **Symptom**: Error `session already started` when trying to join or start a call.
|
|
363
|
-
- **Cause**:
|
|
364
|
-
|
|
431
|
+
- **Cause**: Two distinct causes — diagnose both:
|
|
432
|
+
1. **Duplicate `CometChatUIKitCalls.init()` within one app lifecycle.** The Calls SDK is single-init (rule **CALL_INIT_ONCE** — see `cometchat-flutter-v6-calls`). Calling init more than once (e.g., from multiple bootstrap paths, hot-restart with stale state) emits this error.
|
|
433
|
+
2. **Stale call session from a prior call** that was not ended cleanly — user navigated away without hanging up, or the app was killed mid-call.
|
|
434
|
+
- **Fix**:
|
|
435
|
+
|
|
436
|
+
```dart
|
|
437
|
+
// ✅ CAUSE (a) — single-init guard at app boot
|
|
438
|
+
bool _callsInitDone = false;
|
|
439
|
+
Future<void> initCallsOnce(CallAppSettings settings) async {
|
|
440
|
+
if (_callsInitDone) return;
|
|
441
|
+
await CometChatUIKitCalls.init(settings);
|
|
442
|
+
_callsInitDone = true;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// ✅ CAUSE (b) — clean up the stale session via the UIKit-namespaced API.
|
|
446
|
+
// The method is endSession (NOT endCall) and takes named callbacks, no sessionId
|
|
447
|
+
// — verified vs cometchat_uikit_calls.dart:236.
|
|
448
|
+
await CometChatUIKitCalls.endSession(
|
|
449
|
+
onSuccess: (_) {},
|
|
450
|
+
onError: (e) => debugPrint('endSession failed: $e'),
|
|
451
|
+
);
|
|
452
|
+
|
|
453
|
+
// ❌ WRONG — bare CometChat.endCall is the Chat SDK API, not the calls cleanup
|
|
454
|
+
CometChat.endCall(sessionId, onSuccess: ..., onError: ...);
|
|
455
|
+
```
|
|
365
456
|
|
|
366
457
|
### 4.3 "CallManager not found" / "Calling module not found"
|
|
367
458
|
|
|
@@ -402,6 +493,58 @@ Widget build(BuildContext context) {
|
|
|
402
493
|
- **Cause**: The Calls SDK maintains its own session state. After `CometChatUIKit.logout()`, the Calls SDK session is invalidated but may not be properly re-initialized on the next login.
|
|
403
494
|
- **Fix**: Ensure the Calls SDK is re-initialized after login. The UIKit handles this internally — if you're managing calls manually, call the Calls SDK init after each successful login.
|
|
404
495
|
|
|
496
|
+
### 4.7 Outgoing call screen never renders / app shows nothing after tapping call (V6 navigatorKey trap)
|
|
497
|
+
|
|
498
|
+
- **Symptom**: Caller taps the call button. The peer rings (server received the call). The caller's Flutter app shows **nothing** — no outgoing-call screen, no error in `onSuccess`/`onError`. `CometChat.initiateCall` returns successfully with a valid `sessionId`, but no UI ever appears.
|
|
499
|
+
- **Cause**: `MaterialApp` is missing `navigatorKey: CallNavigationContext.navigatorKey`. The kit's `CometChatCallButtons` and outgoing-call flow navigate via `CallNavigationContext.navigatorKey.currentContext` — which is `null` until the app's `MaterialApp` is wired to that key. The failure is silent because `initiateCall` itself succeeds; only the *navigation* to the outgoing-call screen fails. **Important**: the vendor's own 6.0.1 sample app is missing this line, so customers who copied `main.dart` verbatim will hit this bug. This is the single most common customer-blocking V6 calls trap.
|
|
500
|
+
- **Fix**: Wire `CallNavigationContext.navigatorKey` on the root `MaterialApp`:
|
|
501
|
+
|
|
502
|
+
```dart
|
|
503
|
+
// ✅ CORRECT — navigatorKey wired on MaterialApp
|
|
504
|
+
import 'package:flutter/material.dart';
|
|
505
|
+
import 'package:cometchat_chat_uikit/cometchat_calls_uikit.dart'
|
|
506
|
+
show CallNavigationContext; // calls is a sub-library of cometchat_chat_uikit — there is NO separate cometchat_calls_uikit package in v6
|
|
507
|
+
|
|
508
|
+
class MyApp extends StatelessWidget {
|
|
509
|
+
@override
|
|
510
|
+
Widget build(BuildContext context) {
|
|
511
|
+
return MaterialApp(
|
|
512
|
+
navigatorKey: CallNavigationContext.navigatorKey, // REQUIRED for V6 calls
|
|
513
|
+
home: const HomeScreen(),
|
|
514
|
+
);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// ❌ WRONG — no navigatorKey; outgoing-call screen never appears
|
|
519
|
+
return MaterialApp(
|
|
520
|
+
home: const HomeScreen(),
|
|
521
|
+
);
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
See `cometchat-flutter-v6-calls` §1.7 for the canonical wiring rule.
|
|
525
|
+
|
|
526
|
+
### 4.8 Stuck on "Calling…" after peer accepts (v6.0.0-beta2 BLoC bug — fixed in 6.0.1)
|
|
527
|
+
|
|
528
|
+
- **Symptom**: Outgoing call screen displays correctly, peer accepts the call, but the caller's screen stays stuck on "Calling…" and never transitions to the in-call surface. Audio/video may already be flowing in the background; only the UI state is wrong.
|
|
529
|
+
- **Cause**: A known BLoC transition bug in `cometchat_chat_uikit ^6.0.0-beta2` where the outgoing → in-call state never fires. **This is FIXED in 6.0.1 GA.**
|
|
530
|
+
- **Fix**: Upgrade to `cometchat_chat_uikit ^6.0.1` (or the latest 6.x):
|
|
531
|
+
|
|
532
|
+
```yaml
|
|
533
|
+
# pubspec.yaml
|
|
534
|
+
dependencies:
|
|
535
|
+
cometchat_chat_uikit: ^6.0.1 # was ^6.0.0-beta2
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
Then run:
|
|
539
|
+
|
|
540
|
+
```bash
|
|
541
|
+
flutter pub get
|
|
542
|
+
flutter clean
|
|
543
|
+
flutter run
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
If the bug persists after upgrade, verify Section 4.7 (`navigatorKey` is still required on 6.0.1).
|
|
547
|
+
|
|
405
548
|
---
|
|
406
549
|
|
|
407
550
|
## 5. Listener Issues
|
|
@@ -467,6 +610,18 @@ UIKitSettingsBuilder()
|
|
|
467
610
|
|
|
468
611
|
## 6. Build Errors
|
|
469
612
|
|
|
613
|
+
### 6.0 `pub get` can't resolve `cometchat_chat_uikit` ^6.x / resolves a beta
|
|
614
|
+
|
|
615
|
+
- **Symptom**: `flutter pub get` fails to find `cometchat_chat_uikit ^6.0.x`, or pulls a `6.0.0-beta` instead of the GA.
|
|
616
|
+
- **Cause**: Wrong package source. **The v6 GA is on pub.dev**; Cloudsmith hosts only the beta + legacy V5.
|
|
617
|
+
- **Fix**: Use the default pub.dev source — `dependencies: cometchat_chat_uikit: ^6.0.2` (no `hosted:` block). Only add the Cloudsmith `hosted:` URL if you are intentionally on a beta/V5. (V6 calls fold into this one package — there is no separate `cometchat_calls_uikit` package on v6; calls types come from the `package:cometchat_chat_uikit/cometchat_calls_uikit.dart` sub-library.)
|
|
618
|
+
|
|
619
|
+
### 6.05 Push token never registers / looking for `PNRegistry`
|
|
620
|
+
|
|
621
|
+
- **Symptom**: Push notifications never arrive; code references a `PNRegistry` class that won't import.
|
|
622
|
+
- **Cause**: `PNRegistry` is **not** a kit/SDK symbol — it's a copy-in **V5 sample-app extension** (`extension PNRegistry on CometChatService`), not exported by any `cometchat_*` package.
|
|
623
|
+
- **Fix**: The real push API is `CometChatNotifications.registerPushToken(PushPlatforms.FCM_FLUTTER_ANDROID, fcmToken: token, providerId: ...)` (+ `FCM_FLUTTER_IOS` / `APNS_FLUTTER_DEVICE` / `APNS_FLUTTER_VOIP`) — call it AFTER login, and `unregisterPushToken(...)` on logout. See `cometchat-flutter-v6-push`.
|
|
624
|
+
|
|
470
625
|
### 6.1 Android: ClassNotFoundException (missing ProGuard rules)
|
|
471
626
|
|
|
472
627
|
- **Symptom**: Release build crashes with `ClassNotFoundException` for CometChat classes. Debug builds work fine.
|
|
@@ -572,6 +727,12 @@ For VoIP calls, also add:
|
|
|
572
727
|
</array>
|
|
573
728
|
```
|
|
574
729
|
|
|
730
|
+
### 6.6 Android: KGP "legacy plugin application" warning (benign)
|
|
731
|
+
|
|
732
|
+
- **Symptom**: `flutter build apk` / `flutter run` prints a warning that the CometChat plugins apply the Kotlin Gradle Plugin the legacy way (e.g. *"The Kotlin Gradle plugin was loaded multiple times…"* / legacy-plugin-application deprecation from both `cometchat_chat_uikit` and `cometchat_calls_sdk`).
|
|
733
|
+
- **Cause**: kit-side — the plugins haven't migrated to the declarative `plugins {}` KGP application. It's emitted by the kit, not your project.
|
|
734
|
+
- **Fix**: **None needed — this is a warning, not an error.** The build still succeeds (verified — real `flutter build apk --debug`). Don't try to "fix" it in your app; it clears when the kit updates its Gradle plugin wiring.
|
|
735
|
+
|
|
575
736
|
---
|
|
576
737
|
|
|
577
738
|
## 7. Performance Issues
|
|
@@ -695,9 +856,11 @@ if (!kIsWeb) {
|
|
|
695
856
|
| Guard screen stuck on spinner | 2.5 | Use `CometChatUIKit.loggedInUser` synchronously after init |
|
|
696
857
|
| ERR_INVALID_REGION | 2.6 | Use lowercase: `'us'`, `'eu'`, `'in'` |
|
|
697
858
|
| StateError: not initialized | 2.7 | Call `ServiceLocator.instance.setup()` before creating BLoC |
|
|
698
|
-
| Double keyboard compensation | 3.1 |
|
|
859
|
+
| Double keyboard compensation (pre-6.0.1) | 3.1 | Upgrade kit to `^6.0.1` (composer clamps to `viewInsets`, ENG-34434); keep `resizeToAvoidBottomInset: true`. `false` is only an old-kit stopgap |
|
|
699
860
|
| No typing indicators / presence | 3.3 | Set `..subscriptionType = CometChatSubscriptionType.allUsers` |
|
|
700
861
|
| Theme jank during keyboard | 3.5 | Cache theme in `didChangeDependencies()`, not `build()` |
|
|
862
|
+
| Outgoing call screen never appears | 4.7 | Wire `navigatorKey: CallNavigationContext.navigatorKey` on `MaterialApp` |
|
|
863
|
+
| Stuck on "Calling…" after peer accepts | 4.8 | Upgrade `cometchat_chat_uikit` from `^6.0.0-beta2` to `^6.0.1` |
|
|
701
864
|
| Duplicate events | 5.1 | Use unique listener ID per widget instance |
|
|
702
865
|
| Listener leak | 5.2 | Remove listener in `dispose()` with same ID |
|
|
703
866
|
| ClassNotFoundException (release) | 6.1 | Add ProGuard keep rules for `com.cometchat.**` |
|
|
@@ -716,11 +879,13 @@ Use this checklist to verify your integration is correct:
|
|
|
716
879
|
- [ ] Auth check uses `CometChatUIKit.loggedInUser` after init (not `CometChat.getLoggedInUser()`)
|
|
717
880
|
- [ ] `subscriptionType` set in UIKitSettingsBuilder
|
|
718
881
|
- [ ] `region` is lowercase (`'us'`, `'eu'`, `'in'`)
|
|
719
|
-
- [ ] Scaffold
|
|
882
|
+
- [ ] Scaffold hosting `CometChatMessageComposer` uses `resizeToAvoidBottomInset: true` (or omits it) on `^6.0.1` — composer clamps to `viewInsets` (ENG-34434); `false` is only the pre-6.0.1 stopgap
|
|
720
883
|
- [ ] Theme cached in `didChangeDependencies()`, not `build()`
|
|
721
884
|
- [ ] SDK listeners registered with unique ID, removed in `dispose()`
|
|
722
885
|
- [ ] Colors from `CometChatThemeHelper`, never hardcoded
|
|
723
886
|
- [ ] Strings from `Translations.of(context)`, never hardcoded
|
|
887
|
+
- [ ] If using calls: `MaterialApp` wires `navigatorKey: CallNavigationContext.navigatorKey` (required for V6 calls, including 6.0.1)
|
|
888
|
+
- [ ] If using calls on 6.0.0-beta2: upgrade to `cometchat_chat_uikit ^6.0.1` (fixes outgoing → in-call BLoC transition)
|
|
724
889
|
- [ ] Android: minSdk ≥ 26, Jetifier enabled, ProGuard rules added
|
|
725
890
|
- [ ] iOS: permissions in Info.plist, deployment target ≥ 13.0
|
|
726
891
|
- [ ] Web: `kIsWeb` guards on platform-specific code
|
|
@@ -8,14 +8,15 @@ description: >
|
|
|
8
8
|
transfer ownership, change scope, UsersRequestBuilder, GroupsRequestBuilder,
|
|
9
9
|
GroupMembersRequestBuilder, or customizing user/group list items.
|
|
10
10
|
license: "MIT"
|
|
11
|
-
compatibility: "cometchat_chat_uikit ^6.0.0
|
|
12
|
-
allowed-tools: "shell, file-read, file-search, file-list, grep"
|
|
11
|
+
compatibility: "cometchat_chat_uikit ^6.0.0; flutter_bloc ^8.1.0"
|
|
13
12
|
metadata:
|
|
14
13
|
author: "CometChat"
|
|
15
14
|
version: "3.0.0"
|
|
16
15
|
tags: "cometchat flutter users groups members contacts"
|
|
17
16
|
---
|
|
18
17
|
|
|
18
|
+
> **Ground truth:** `cometchat_chat_uikit: ^6.0` — pub-cache source + `ui-kit/flutter`. **Official docs:** https://www.cometchat.com/docs/ui-kit/flutter/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
|
|
19
|
+
|
|
19
20
|
# CometChat Flutter UIKit — Users & Groups
|
|
20
21
|
|
|
21
22
|
Components for displaying and managing users, groups, and group members.
|
|
@@ -25,6 +26,9 @@ Components for displaying and managing users, groups, and group members.
|
|
|
25
26
|
Displays a searchable, alphabetically-sorted list of users.
|
|
26
27
|
|
|
27
28
|
```dart
|
|
29
|
+
// MessagesScreen below is a user-defined wrapper around CometChatMessageHeader +
|
|
30
|
+
// CometChatMessageList + CometChatMessageComposer (no CometChatMessages exists in v6) —
|
|
31
|
+
// see the cometchat-flutter-v6-messages skill for the canonical pattern.
|
|
28
32
|
CometChatUsers(
|
|
29
33
|
onItemTap: (context, user) {
|
|
30
34
|
Navigator.push(context, MaterialPageRoute(
|
|
@@ -100,7 +104,9 @@ Displays members of a specific group with role indicators and management actions
|
|
|
100
104
|
```dart
|
|
101
105
|
CometChatGroupMembers(
|
|
102
106
|
group: group,
|
|
103
|
-
|
|
107
|
+
// ⚠️ Note: this prop is `style` (NOT `groupMembersStyle`) — the only
|
|
108
|
+
// V6 list component that breaks the {component}Style naming convention.
|
|
109
|
+
style: CometChatGroupMembersStyle(
|
|
104
110
|
backgroundColor: colorPalette.background1,
|
|
105
111
|
),
|
|
106
112
|
)
|
|
@@ -151,7 +157,9 @@ All list components support selection:
|
|
|
151
157
|
```dart
|
|
152
158
|
CometChatUsers(
|
|
153
159
|
selectionMode: SelectionMode.multiple,
|
|
154
|
-
onSelection
|
|
160
|
+
// ⚠️ CometChatUsers.onSelection passes TWO args (List<User>?, BuildContext).
|
|
161
|
+
// CometChatGroups.onSelection passes ONE (List<Group>?). The signatures differ.
|
|
162
|
+
onSelection: (selectedUsers, context) {
|
|
155
163
|
// Handle selected users
|
|
156
164
|
},
|
|
157
165
|
activateSelection: ActivateSelection.onLongClick,
|