@cometchat/skills 4.2.1 → 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/README.md +33 -12
- package/bin/install.js +59 -4
- package/package.json +14 -1
- package/skills/cometchat/SKILL.md +460 -77
- 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 +20 -2
- 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 +389 -9
- 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 +235 -293
- 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 +22 -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 +412 -13
- 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 +20 -2
- 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 +78 -63
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +8 -6
- 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 +348 -10
- 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 +43 -21
- package/skills/cometchat-flutter-v6-testing/SKILL.md +6 -6
- 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 +281 -11
- 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 +56 -18
- package/skills/cometchat-native-calls/SKILL.md +89 -19
- 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 +91 -57
- package/skills/cometchat-native-core/SKILL.md +281 -9
- package/skills/cometchat-native-customization/SKILL.md +150 -28
- package/skills/cometchat-native-expo-patterns/SKILL.md +77 -27
- package/skills/cometchat-native-features/SKILL.md +79 -49
- 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 +71 -3
- package/skills/cometchat-nextjs-patterns/SKILL.md +48 -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 +57 -4
- package/skills/cometchat-react-push/SKILL.md +258 -72
- package/skills/cometchat-react-router-patterns/SKILL.md +43 -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
|
@@ -3,7 +3,6 @@ name: cometchat-flutter-v5-testing
|
|
|
3
3
|
description: Testing patterns for CometChat Flutter UIKit v5 (GetX-based). Covers flutter_test (built-in), mocktail for SDK mocking, widget tests around CometChat widgets, integration_test for real-device flows, golden tests for theming, and CI on GitHub Actions / Codemagic. Sister skill of cometchat-flutter-v6-testing — the cohorts have different state-management primitives (GetX vs Bloc) so test patterns differ.
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Flutter >= 2.5, Dart >= 2.17; flutter_test (built-in); mocktail >= 1.0; integration_test (built-in); cometchat_chat_uikit ^5.2; cometchat_calls_uikit ^5.0"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list, ask-user"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "4.0.0"
|
|
@@ -18,7 +17,7 @@ Test recipes for Flutter UIKit v5. Covers the GetX-flavored patterns; v6 (Bloc)
|
|
|
18
17
|
- `cometchat-flutter-v5-core` — UIKitSettingsBuilder, init/login order, GetX scope rules
|
|
19
18
|
- `cometchat-flutter-v5-events` — event subscription patterns the tests assert against
|
|
20
19
|
|
|
21
|
-
**Ground truth:**
|
|
20
|
+
**Ground truth:** **Official docs:** https://www.cometchat.com/docs/ui-kit/flutter/v5/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP).
|
|
22
21
|
- flutter_test — https://api.flutter.dev/flutter/flutter_test/flutter_test-library.html
|
|
23
22
|
- mocktail — https://pub.dev/packages/mocktail
|
|
24
23
|
|
|
@@ -91,12 +90,15 @@ class CometChatServiceImpl implements CometChatService {
|
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
@override
|
|
94
|
-
|
|
93
|
+
// Sync accessor → the static field. CometChatUIKit.getLoggedInUser() is async
|
|
94
|
+
// (Future<User?>) and would not satisfy this `User?` signature.
|
|
95
|
+
User? getLoggedInUser() => CometChatUIKit.loggedInUser;
|
|
95
96
|
|
|
96
97
|
@override
|
|
97
98
|
Future<TextMessage> sendMessage(TextMessage message) async {
|
|
98
99
|
final completer = Completer<TextMessage>();
|
|
99
|
-
|
|
100
|
+
// sendTextMessage takes message as positional, not named (verified cometchat_ui_kit.dart:357).
|
|
101
|
+
CometChatUIKit.sendTextMessage(message, onSuccess: completer.complete, onError: completer.completeError);
|
|
100
102
|
return completer.future;
|
|
101
103
|
}
|
|
102
104
|
}
|
|
@@ -164,7 +166,8 @@ void main() {
|
|
|
164
166
|
|
|
165
167
|
expect(find.byType(CircularProgressIndicator), findsOneWidget);
|
|
166
168
|
|
|
167
|
-
|
|
169
|
+
// User constructor requires both uid AND name (verified User constructor in chat-sdk-flutter).
|
|
170
|
+
loginCompleter.complete(User(uid: 'cometchat-uid-1', name: 'Alice'));
|
|
168
171
|
await tester.pumpAndSettle();
|
|
169
172
|
|
|
170
173
|
expect(find.byType(CircularProgressIndicator), findsNothing);
|
|
@@ -273,7 +276,15 @@ testWidgets('chat bubble renders correctly in light theme', (tester) async {
|
|
|
273
276
|
theme: ThemeData.light(),
|
|
274
277
|
home: Scaffold(
|
|
275
278
|
body: ChatBubble(
|
|
276
|
-
|
|
279
|
+
// TextMessage requires: text, receiverUid, type, receiverType + sender (User object).
|
|
280
|
+
// senderUid is NOT a TextMessage constructor param — set via sender (User).
|
|
281
|
+
message: TextMessage(
|
|
282
|
+
text: 'Hello',
|
|
283
|
+
receiverUid: 'bob',
|
|
284
|
+
type: 'text',
|
|
285
|
+
receiverType: 'user',
|
|
286
|
+
sender: User(uid: 'alice', name: 'Alice'),
|
|
287
|
+
),
|
|
277
288
|
),
|
|
278
289
|
),
|
|
279
290
|
));
|
|
@@ -3,13 +3,14 @@ name: cometchat-flutter-v5-theming
|
|
|
3
3
|
description: "Use when customizing the visual appearance of CometChat Flutter UIKit v5 components. Triggers on CometChatThemeHelper, CometChatColorPalette, CometChatSpacing, CometChatTypography, Style classes, merge()."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_uikit_shared ^5.2.3; flutter >=2.5.0"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
10
9
|
tags: "cometchat flutter v5 theme colors typography spacing dark-mode styling"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** `cometchat_chat_uikit: ^5.2` (legacy/maintenance-only; calls via raw `cometchat_calls_sdk ^5.0.2`) — pub-cache source + `ui-kit/flutter/v5`. **Official docs:** https://www.cometchat.com/docs/ui-kit/flutter/v5/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.
|
|
13
|
+
|
|
13
14
|
# CometChat Flutter UIKit v5 — Theming & Styling
|
|
14
15
|
|
|
15
16
|
How to customize the visual appearance of all CometChat v5 components.
|
|
@@ -3,13 +3,14 @@ name: cometchat-flutter-v5-troubleshooting
|
|
|
3
3
|
description: "Use when debugging CometChat Flutter UIKit v5 issues. Symptom-to-cause lookup, verify checks, common errors, drift detection."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_calls_uikit ^5.0.15; cometchat_uikit_shared ^5.2.3"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
10
9
|
tags: "cometchat flutter v5 troubleshooting debug errors fix"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** `cometchat_chat_uikit: ^5.2` (legacy/maintenance-only; calls via raw `cometchat_calls_sdk ^5.0.2`) — pub-cache source + `ui-kit/flutter/v5`. **Official docs:** https://www.cometchat.com/docs/ui-kit/flutter/v5/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.
|
|
13
|
+
|
|
13
14
|
# CometChat Flutter UIKit v5 — Troubleshooting
|
|
14
15
|
|
|
15
16
|
Symptom-to-cause lookup and verification checks.
|
|
@@ -66,8 +67,8 @@ Symptom-to-cause lookup and verification checks.
|
|
|
66
67
|
|
|
67
68
|
| Symptom | Cause | Fix |
|
|
68
69
|
|---------|-------|-----|
|
|
69
|
-
| No push notifications | Token not registered | Call `
|
|
70
|
-
| Notifications after logout | Token not unregistered | Call `
|
|
70
|
+
| No push notifications | Token not registered | Call `CometChatNotifications.registerPushToken(PushPlatforms.FCM_FLUTTER_ANDROID, fcmToken: token, ...)` after login (`PNRegistry.registerPNService` is a v5 sample-app extension, not a kit API — must be copied in; see cometchat-flutter-v5-push) |
|
|
71
|
+
| Notifications after logout | Token not unregistered | Call `CometChatNotifications.unregisterPushToken(onSuccess:, onError:)` before logout |
|
|
71
72
|
| Duplicate notifications | Foreground notification shown for active conversation | Check `conversationId` match before showing |
|
|
72
73
|
| VoIP call notification doesn't show | Background handler not top-level | Use `@pragma('vm:entry-point')` on top-level function |
|
|
73
74
|
| Tap doesn't navigate | `CallNavigationContext.navigatorKey.currentContext` is null | Ensure `navigatorKey` is set on MaterialApp |
|
|
@@ -78,8 +79,8 @@ Symptom-to-cause lookup and verification checks.
|
|
|
78
79
|
| Symptom | Cause | Fix |
|
|
79
80
|
|---------|-------|-----|
|
|
80
81
|
| Release build crash | Missing ProGuard keep rules | Add `-keep class com.cometchat.** { *; }` |
|
|
81
|
-
| Build fails with minSdk error | minSdk too low | Set `minSdk
|
|
82
|
-
| AndroidX conflict | Missing AndroidX migration | Set `android.useAndroidX=true` in `gradle.properties` |
|
|
82
|
+
| Build fails with minSdk error | minSdk too low | Set `minSdk 24` in `android/app/build.gradle` (matches vendor sample apps; bump to 26 ONLY if calls + min-SDK runtime errors) |
|
|
83
|
+
| AndroidX conflict | Missing AndroidX migration | Set BOTH `android.useAndroidX=true` AND `android.enableJetifier=true` in `gradle.properties` |
|
|
83
84
|
|
|
84
85
|
## iOS Build Issues
|
|
85
86
|
|
|
@@ -108,7 +109,7 @@ If you see any of these in a v5 project, it's a v6 pattern that was accidentally
|
|
|
108
109
|
| `extends Equatable` | Not used in v5 |
|
|
109
110
|
| `ServiceLocator.get<T>()` | `Get.find<T>()` or let widget manage |
|
|
110
111
|
| Single `cometchat_chat_uikit` with calls built-in | Separate `cometchat_calls_uikit` package |
|
|
111
|
-
| Per-widget feature flags only
|
|
112
|
+
| Per-component style classes (e.g. `CometChatConversationsStyle`, `CometChatMessageListStyle`) + theme via `CometChatTheme` | Per-widget feature flags only (no BuilderSettings/BuilderColor/BuilderTypography in v5 — those are v4 leftovers) |
|
|
112
113
|
| `enableCalls: true` + `CallingConfiguration()` on UIKitSettingsBuilder | `..callingExtension = CometChatCallingExtension()` |
|
|
113
114
|
|
|
114
115
|
## Verify Checklist
|
|
@@ -3,13 +3,14 @@ name: cometchat-flutter-v5-users-groups
|
|
|
3
3
|
description: "Use when working with CometChat Flutter UIKit v5 user and group list components. Triggers on CometChatUsers, CometChatGroups, CometChatGroupMembers, CometChatChangeScope."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_uikit_shared ^5.2.3"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
10
9
|
tags: "cometchat flutter v5 users groups members scope contacts"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** `cometchat_chat_uikit: ^5.2` (legacy/maintenance-only; calls via raw `cometchat_calls_sdk ^5.0.2`) — pub-cache source + `ui-kit/flutter/v5`. **Official docs:** https://www.cometchat.com/docs/ui-kit/flutter/v5/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.
|
|
13
|
+
|
|
13
14
|
# CometChat Flutter UIKit v5 — Users & Groups
|
|
14
15
|
|
|
15
16
|
Components for displaying and managing users, groups, and group members.
|
|
@@ -112,7 +113,7 @@ CometChatGroupMembers(
|
|
|
112
113
|
)
|
|
113
114
|
```
|
|
114
115
|
|
|
115
|
-
Key props: `group` (required), `groupMembersRequestBuilder`, `
|
|
116
|
+
Key props: `group` (required), `groupMembersRequestBuilder`, **`style`** (`CometChatGroupMembersStyle?` — prop name is `style`, NOT `groupMembersStyle`; verified `cometchat_group_members.dart:25/88`), `subtitleView`, `trailingView`, `onItemTap` (`Function(GroupMember)?` — **no BuildContext**), `selectionMode`, `onSelection` (`Function(List<GroupMember>?)?` — no BuildContext).
|
|
116
117
|
|
|
117
118
|
## CometChatChangeScope
|
|
118
119
|
|
|
@@ -10,14 +10,15 @@ description: >
|
|
|
10
10
|
authentication null. Also for adding chat to Flutter, customizing bubbles, theming,
|
|
11
11
|
real-time messages. Use whenever user mentions CometChat or says "chat UI".
|
|
12
12
|
license: "MIT"
|
|
13
|
-
compatibility: "flutter >=2.5.0; dart >=2.17.0; cometchat_chat_uikit 6.0.0
|
|
14
|
-
allowed-tools: "shell, file-read, file-search, file-list, grep"
|
|
13
|
+
compatibility: "flutter >=2.5.0; dart >=2.17.0; cometchat_chat_uikit ^6.0.1 (GA on pub.dev; resolves 6.0.x — 6.0.1 fixed the BLoC transition bug)"
|
|
15
14
|
metadata:
|
|
16
15
|
author: "CometChat"
|
|
17
16
|
version: "3.0.0"
|
|
18
17
|
tags: "cometchat flutter chat uikit messaging conversations bloc clean-architecture"
|
|
19
18
|
---
|
|
20
19
|
|
|
20
|
+
> **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.
|
|
21
|
+
|
|
21
22
|
# CometChat Flutter UIKit v6 — Orchestrator
|
|
22
23
|
|
|
23
24
|
Entry point skill for the `cometchat_chat_uikit` package. Routes to feature skills based on context.
|
|
@@ -27,14 +28,14 @@ Entry point skill for the `cometchat_chat_uikit` package. Routes to feature skil
|
|
|
27
28
|
Confirm the project uses CometChat UIKit by checking `pubspec.yaml` for:
|
|
28
29
|
```yaml
|
|
29
30
|
dependencies:
|
|
30
|
-
cometchat_chat_uikit:
|
|
31
|
-
hosted: https://dart.cloudsmith.io/cometchat/cometchat/
|
|
32
|
-
version: 6.0.0-beta2
|
|
31
|
+
cometchat_chat_uikit: ^6.0.1 # V6 GA — plain pub.dev (do NOT use a `hosted:` Cloudsmith stanza)
|
|
33
32
|
```
|
|
34
33
|
|
|
34
|
+
> **V6 GA lives on pub.dev, NOT Cloudsmith.** Cloudsmith (`dart.cloudsmith.io/cometchat/cometchat/`) only hosts the pre-GA `6.0.0-beta*` builds; a `--hosted-url`/`hosted:` Cloudsmith install of `^6.0.x` fails with "version solving failed". Use plain pub.dev. (Cloudsmith is only for the legacy **V5** packages — see `cometchat-flutter-v5`.) The GA range resolves `6.0.1`/`6.0.2`/`6.0.3`.
|
|
35
|
+
|
|
35
36
|
If missing, install via:
|
|
36
37
|
```bash
|
|
37
|
-
dart pub add cometchat_chat_uikit
|
|
38
|
+
dart pub add cometchat_chat_uikit:^6.0.1
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
Call functionality is built into `cometchat_chat_uikit` — no separate package needed. To use call-specific types, import the calls barrel:
|
|
@@ -152,9 +153,9 @@ CometChatConversations(
|
|
|
152
153
|
},
|
|
153
154
|
)
|
|
154
155
|
|
|
155
|
-
// 4. Messages screen
|
|
156
|
+
// 4. Messages screen — on ^6.0.1 use resizeToAvoidBottomInset: true (or omit it)
|
|
156
157
|
Scaffold(
|
|
157
|
-
resizeToAvoidBottomInset:
|
|
158
|
+
resizeToAvoidBottomInset: true, // ^6.0.1: composer clamps to viewInsets (ENG-34434); `false` is the pre-6.0.1 stopgap only. See cometchat-flutter-v6-core SCAFFOLD_NO_RESIZE.
|
|
158
159
|
appBar: CometChatMessageHeader(
|
|
159
160
|
user: user,
|
|
160
161
|
group: group,
|
|
@@ -259,10 +260,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
|
|
259
260
|
|
|
260
261
|
CometChatUIKit.login(uid,
|
|
261
262
|
onSuccess: (_) {
|
|
262
|
-
if (mounted) widget.onLoginSuccess();
|
|
263
|
+
if (mounted) { widget.onLoginSuccess(); }
|
|
263
264
|
},
|
|
264
265
|
onError: (e) {
|
|
265
|
-
if (mounted) setState(() { _loggingIn = false; _error = e.message; });
|
|
266
|
+
if (mounted) { setState(() { _loggingIn = false; _error = e.message; }); }
|
|
266
267
|
},
|
|
267
268
|
);
|
|
268
269
|
}
|
|
@@ -341,7 +342,7 @@ class MessagesScreen extends StatelessWidget {
|
|
|
341
342
|
@override
|
|
342
343
|
Widget build(BuildContext context) {
|
|
343
344
|
return Scaffold(
|
|
344
|
-
resizeToAvoidBottomInset:
|
|
345
|
+
resizeToAvoidBottomInset: true, // ^6.0.1: composer clamps to viewInsets (ENG-34434); `false` is the pre-6.0.1 stopgap only
|
|
345
346
|
appBar: CometChatMessageHeader(
|
|
346
347
|
user: user,
|
|
347
348
|
group: group,
|
|
@@ -362,20 +363,20 @@ Key points in this scaffold:
|
|
|
362
363
|
- `CometChatUIKit.loggedInUser` is checked synchronously after `init()` — no separate `getLoggedInUser()` call
|
|
363
364
|
- State is managed at the `MyApp` level so login/logout transitions are clean
|
|
364
365
|
- `LoginScreen` uses `CometChatUIKit.login(uid)` with auth key (set in UIKitSettings)
|
|
365
|
-
- `MessagesScreen` has `resizeToAvoidBottomInset: false`
|
|
366
|
+
- `MessagesScreen` has `resizeToAvoidBottomInset: true` (or omits it — `true` is the default; the composer clamps to `viewInsets` on ^6.0.1 per ENG-34434). `false` was the pre-6.0.1 stopgap only.
|
|
366
367
|
- Logout calls `CometChatUIKit.logout()` and resets state
|
|
367
368
|
|
|
368
|
-
##
|
|
369
|
+
## Common Error Debugging
|
|
369
370
|
|
|
370
371
|
| Symptom | Cause | Fix |
|
|
371
372
|
|---------|-------|-----|
|
|
372
373
|
| "Authentication null" | `CometChatUIKit.init()` not called | Call init before login/components |
|
|
373
374
|
| "APP ID null" | appId not set in UIKitSettingsBuilder | Set `..appId = 'YOUR_APP_ID'` |
|
|
374
|
-
| Double keyboard
|
|
375
|
+
| Double keyboard gap on `^6.0.1+` | Leftover pre-6.0.1 `resizeToAvoidBottomInset: false` workaround | Set it to `true` (or omit) — the composer clamps the keyboard internally on 6.0.1+ (ENG-34434); `false` is what now double-compensates. Upgrade the kit if you still see a gap with `true`. |
|
|
375
376
|
| No typing indicators / presence | `subscriptionType` not set | Set `..subscriptionType = CometChatSubscriptionType.allUsers` |
|
|
376
377
|
| Theme jank during keyboard | Theme looked up in `build()` | Cache in `didChangeDependencies()` with `_themeInitialized` flag |
|
|
377
378
|
| Listener leak / duplicate events | Listener not removed in `dispose()` | Always remove with same ID used to register |
|
|
378
|
-
| "ERR_ALREADY_LOGGED_IN" | Calling login when session exists | Check `CometChatUIKit.
|
|
379
|
+
| "ERR_ALREADY_LOGGED_IN" | Calling login when session exists | Check `CometChatUIKit.loggedInUser != null` first (synchronous static field — aligns with §85 rule) |
|
|
379
380
|
| Messages not updating in real-time | SDK listener not registered | BLoC registers automatically; check component is mounted |
|
|
380
381
|
| Stale user/group data | Passing widget params instead of mutable state | Keep mutable `_user`/`_group` in State, update from listeners |
|
|
381
382
|
| Region error | Uppercase region string | Use lowercase: 'us', 'eu', 'in' |
|
|
@@ -389,7 +390,7 @@ Key points in this scaffold:
|
|
|
389
390
|
|
|
390
391
|
- If `pubspec.yaml` has `cometchat_chat_uikit` → proceed without asking
|
|
391
392
|
- If credentials exist in code → reuse them, don't ask
|
|
392
|
-
- If user says "messages screen" → generate Scaffold + Header + List + Composer with `resizeToAvoidBottomInset:
|
|
393
|
+
- If user says "messages screen" → generate Scaffold + Header + List + Composer with `resizeToAvoidBottomInset: true` (or omit it — `true` is correct on ^6.0.1+)
|
|
393
394
|
- Always add `subscriptionType` to UIKitSettingsBuilder
|
|
394
395
|
- Always use `CometChatThemeHelper` for colors, never hardcode
|
|
395
396
|
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cometchat-flutter-v6-calls
|
|
3
|
-
description: CometChat Calls integration for Flutter UIKit v6 (Bloc-based,
|
|
3
|
+
description: "CometChat Calls integration for Flutter UIKit v6 (Bloc-based, stable). Production-ready at v6.0.1 GA (validated 2026-05-27 on Pixel 3) with ONE explicit MaterialApp wiring requirement still active from v6.0.0-beta2 — MaterialApp MUST wire navigatorKey to CallNavigationContext.navigatorKey or the outgoing-call screen never renders. (Vendor's own 6.0.1 sample is missing this line and broken out-of-the-box — file a vendor ticket if you find that sample first.) The earlier outgoing-to-in-call BLoC transition bug from beta2 is FIXED in 6.0.1 GA per the v6.0.0 changelog's 'Refreshed BLoC implementations across ongoing call flows' entry. Customers can now use V6 for calls. Covers UIKitSettings calling block, CometChatUIKitCalls.init() after CometChatUIKit.init() (CALLS_INIT_AFTER_CHAT_INIT), the kit's Bloc-driven CometChatCallButtons / CometChatIncomingCall / CometChatOutgoingCall / CometChatOngoingCall / CometChatCallLogs / CometChatCallBubble widgets, CallingConfiguration, CallOperationsServiceLocator lifecycle, VoIP push via external packages (FCM + PushKit + flutter_callkit_incoming — there is NO bundled native_call_kit module in the kit), and additive-vs-standalone modes."
|
|
4
4
|
license: "MIT"
|
|
5
|
-
compatibility: "Flutter >= 2.5, Dart >= 3.0; cometchat_chat_uikit ^6.0.
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list, ask-user"
|
|
5
|
+
compatibility: "Flutter >= 2.5, Dart >= 3.0; cometchat_chat_uikit ^6.0.1 (calls bundled in); minSdk 26+ on Android; iOS 13+"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "4.0.0"
|
|
10
|
-
tags: "cometchat flutter v6
|
|
9
|
+
tags: "cometchat flutter v6 ga calls voice video webrtc bloc incoming outgoing ongoing call-logs callkit pushkit connectionservice fcm voip-push native-call-kit call-operations service-locator"
|
|
11
10
|
---
|
|
12
11
|
|
|
13
12
|
## Purpose
|
|
14
13
|
|
|
15
|
-
Production-grade voice + video calling for Flutter UIKit v6 (
|
|
14
|
+
Production-grade voice + video calling for Flutter UIKit v6 (stable, Bloc-based). Loaded by `cometchat-calls` when `framework === "flutter"` and `flutter_version === "v6"`. Operates in two modes:
|
|
16
15
|
|
|
17
16
|
- **Standalone** — calls is the product. Chat SDK + Calls SDK without the v6 UI Kit (rare today, since the UI Kit ships calling bundled). Custom call screens on the SDKs.
|
|
18
17
|
- **Additive** — calls layered onto an existing v6 chat integration. The v6 UI Kit ships call widgets in the same package (`cometchat_chat_uikit`) — no extra dependency. The skill enables calling on `UIKitSettings`, calls `CometChatUIKitCalls.init()` in the chat-init success callback, mounts the global incoming-call overlay at app root.
|
|
@@ -29,43 +28,64 @@ Production-grade voice + video calling for Flutter UIKit v6 (beta, Bloc-based).
|
|
|
29
28
|
- V6 `CometChatUIKitCalls.init(appId, region)` must run AFTER `CometChatUIKit.init()` succeeds; V5 hides this via `CometChatCallingExtension`
|
|
30
29
|
|
|
31
30
|
**Ground truth:**
|
|
32
|
-
- SDK source — installed `cometchat_chat_uikit@6.0.
|
|
33
|
-
- Sample app —
|
|
31
|
+
- SDK source — installed `cometchat_chat_uikit@6.0.1` artifacts under `~/.pub-cache/`
|
|
32
|
+
- Sample app — `calls-sdk-flutter-5/sample-apps/` (V5 sample; V6 sample app may not exist yet — verify before citing)
|
|
34
33
|
- Public docs — https://www.cometchat.com/docs/calls/flutter/overview (note: V6 docs may still reference V5 module split)
|
|
35
34
|
|
|
36
35
|
---
|
|
37
36
|
|
|
38
37
|
## 1. The seven hard rules — Flutter v6 specialization
|
|
39
38
|
|
|
40
|
-
### 1.0 Calls SDK login
|
|
39
|
+
### 1.0 Calls SDK login — handled automatically when `enableCalls: true` (ENG-35699)
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
> **Single source of truth, verified against installed `cometchat_chat_uikit-6.0.1` source on 2026-06-01:** when you set `..enableCalls = true` on `UIKitSettingsBuilder` AND use `CometChatUIKit.init`/`login` (i.e. the V6 UIKit shape, the recommended path), **the kit's `CallEventService` calls `CometChatCalls.init()` AND `CometChatCalls.loginWithAuthToken(...)` for you internally** — once Chat SDK login resolves, the kit hands the auth token to the Calls SDK and brings it online. You do NOT need to call `CometChatCalls.login` yourself. See `lib/call_ui/src/call_event_service.dart` lines 87-197 in the installed package.
|
|
42
|
+
>
|
|
43
|
+
> The earlier version of this skill said "Same as v5 cohort — you MUST also call `CometChatCalls.login`." That's wrong for V6 UIKit usage. It IS correct only when the integration is **raw SDK (no UIKit)** — i.e. the developer imported `cometchat_calls_sdk` directly without going through `CometChatUIKit`. Most integrations don't.
|
|
43
44
|
|
|
44
|
-
V6
|
|
45
|
+
**The V6 UIKit recipe (recommended — 99% of integrations):**
|
|
45
46
|
|
|
46
47
|
```dart
|
|
47
|
-
|
|
48
|
+
final settings = (UIKitSettingsBuilder()
|
|
49
|
+
..subscriptionType = CometChatSubscriptionType.allUsers
|
|
50
|
+
..region = REGION
|
|
51
|
+
..appId = APP_ID
|
|
52
|
+
..authKey = AUTH_KEY
|
|
53
|
+
..enableCalls = true) // <-- this flag wires CallEventService
|
|
54
|
+
.build();
|
|
55
|
+
|
|
56
|
+
CometChatUIKit.init(
|
|
57
|
+
uiKitSettings: settings,
|
|
58
|
+
onSuccess: (_) async {
|
|
59
|
+
await CometChatUIKit.login(uid); // kit logs Chat SDK
|
|
60
|
+
// Calls SDK login fires INTERNALLY here via CallEventService.
|
|
61
|
+
// No manual CometChatCalls.login needed.
|
|
62
|
+
},
|
|
63
|
+
onError: (e) { /* surface */ },
|
|
64
|
+
);
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Raw-SDK fallback (only if NOT using `CometChatUIKit`):**
|
|
68
|
+
|
|
69
|
+
```dart
|
|
70
|
+
// You should rarely need this in V6 — only when you've opted out of the UIKit
|
|
71
|
+
// entirely and are wiring chat-sdk + calls-sdk by hand.
|
|
48
72
|
import 'package:cometchat_calls_sdk/cometchat_calls_sdk.dart';
|
|
49
73
|
|
|
50
|
-
//
|
|
74
|
+
// Chat SDK login is POSITIONAL (cometchat.dart:843 — login(String uid, String authKey, {onSuccess, onError}))
|
|
75
|
+
await CometChat.login(uid, AUTH_KEY, onSuccess: (User u) {}, onError: (CometChatException e) {});
|
|
76
|
+
// Calls SDK login uses NAMED params; onError is CometChatCallsException (cometchatcalls.dart:224-228)
|
|
51
77
|
CometChatCalls.login(
|
|
52
78
|
uid: uid,
|
|
53
79
|
authKey: AUTH_KEY,
|
|
54
80
|
onSuccess: (User? callUser) { /* both ready */ },
|
|
55
|
-
onError: (
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
// Production:
|
|
59
|
-
CometChatCalls.loginWithAuthToken(
|
|
60
|
-
authToken: tokenFromBackend,
|
|
61
|
-
onSuccess: (User? user) { /* … */ },
|
|
62
|
-
onError: (CometChatException e) { /* … */ },
|
|
81
|
+
onError: (CometChatCallsException e) { /* surface */ },
|
|
63
82
|
);
|
|
64
83
|
```
|
|
65
84
|
|
|
66
85
|
**Surprises:**
|
|
67
|
-
-
|
|
68
|
-
-
|
|
86
|
+
- The kit waits to log the Calls SDK in until Chat SDK login resolves; this is internal — your code only awaits Chat SDK login.
|
|
87
|
+
- If you set `enableCalls = true` but Chat-SDK login never fires (init error, network), call buttons silently render but the internal `CometChatCalls.startSession` flow throws "auth token cannot be null" (there is no `startCall` method — the lifecycle is `startSession`/`joinSession`). The fix is to surface the Chat SDK login error, not to add a manual `CometChatCalls.login`.
|
|
88
|
+
- Cross-reference: `references/add-calls-to-existing-chat.md` (additive-mode recipe) shows the same canonical pattern.
|
|
69
89
|
|
|
70
90
|
### 1.1 Dual-SDK contract — `CometChatUIKitCalls.init` after `CometChatUIKit.init`
|
|
71
91
|
|
|
@@ -94,19 +114,21 @@ CometChatUIKitCalls.init(appId, region); // race — chat auth not ready
|
|
|
94
114
|
|
|
95
115
|
After logout: the calls SDK session is invalidated; on next login, call `CometChatUIKitCalls.init()` again. Treat this as a "first run" of the calls subsystem.
|
|
96
116
|
|
|
97
|
-
### 1.2 VoIP push —
|
|
117
|
+
### 1.2 VoIP push — external packages (FCM + CallKit/PushKit bridge)
|
|
118
|
+
|
|
119
|
+
> **There is NO bundled `native_call_kit` module in `cometchat_chat_uikit` v6.** (Verified against the published `cometchat_chat_uikit` 6.0.1 source — no `native_call_kit` directory, and no `flutter_callkit_incoming` / CallKit / ConnectionService dependency in its `pubspec.yaml`.) VoIP push is wired with the SAME external packages the v5 family uses — the kit does not provide an OS-ring-UI module of its own.
|
|
98
120
|
|
|
99
|
-
|
|
121
|
+
Wire VoIP push with:
|
|
100
122
|
|
|
101
|
-
- **`firebase_messaging`** — FCM data messages on Android
|
|
102
|
-
-
|
|
103
|
-
-
|
|
123
|
+
- **`firebase_messaging`** — FCM data messages on Android (and iOS data path)
|
|
124
|
+
- **`flutter_callkit_incoming`** — cross-platform OS-level incoming-call ring UI (iOS CallKit + Android ConnectionService); you add this package yourself
|
|
125
|
+
- **iOS PushKit** — platform-channel bridge for VoIP pushes (Flutter has no first-party PushKit plugin) — same approach as v5
|
|
104
126
|
|
|
105
|
-
In additive mode
|
|
127
|
+
The Dart-side handler decodes the incoming-call payload from FCM/PushKit, shows the ring UI via `flutter_callkit_incoming`, and on accept routes into the kit's call surface. In additive mode this is opt-in; in standalone, mandatory.
|
|
106
128
|
|
|
107
129
|
### 1.3 Foreground service — same Android 14+ rules
|
|
108
130
|
|
|
109
|
-
**⚠️ Android build prerequisite — Jetifier is mandatory.**
|
|
131
|
+
**⚠️ Android build prerequisite — Jetifier is mandatory.** In V6 calls are bundled in `cometchat_chat_uikit` (there is no separate `cometchat_calls_uikit` package); one of its transitive deps still pulls in the legacy `com.android.support:support-compat:26.1.0` AAR. Without Jetifier, AGP fails with `Duplicate class android.support.v4.*` errors. Set in `android/gradle.properties`:
|
|
110
132
|
|
|
111
133
|
```properties
|
|
112
134
|
android.useAndroidX=true
|
|
@@ -143,37 +165,34 @@ The kit's call widgets handle the basic teardown automatically; custom WebRTC su
|
|
|
143
165
|
V6 ships an internal `CallPermissions` helper that wraps the standard permission flow:
|
|
144
166
|
|
|
145
167
|
```dart
|
|
146
|
-
final granted = await CallPermissions.
|
|
168
|
+
final granted = await CallPermissions.requestMicrophoneAndCamera(); // video; use requestMicrophone() for audio-only
|
|
147
169
|
if (!granted) { /* surface a clear UI message */ }
|
|
148
170
|
```
|
|
149
171
|
|
|
150
172
|
Native config (Info.plist + AndroidManifest) is identical to V5 (rule 1.6 in `cometchat-flutter-v5-calls`).
|
|
151
173
|
|
|
152
|
-
### 1.7 IncomingCall
|
|
174
|
+
### 1.7 IncomingCall — automatic when `enableCalls = true` (ENG-35698)
|
|
153
175
|
|
|
154
|
-
|
|
176
|
+
> **Canonical truth from `cometchat_chat_uikit-6.0.1`:** the kit's `CallEventService` automatically calls `IncomingCallOverlay.show(...)` from `lib/call_ui/src/incoming_call/cometchat_display_incoming_call_overlay.dart` whenever a foreground incoming call fires AND `enableCalls = true` is set on `UIKitSettingsBuilder`. You do NOT mount the overlay yourself. There is NO `CometChatDisplayIncomingCallOverlay` widget — that was a fictional class name from earlier drafts. The real class is `IncomingCallOverlay` (in `cometchat_display_incoming_call_overlay.dart`) and it's an imperative singleton (`.show(...)` / `.dismiss()`).
|
|
177
|
+
|
|
178
|
+
**The correct V6 wiring is just the navigatorKey:**
|
|
155
179
|
|
|
156
180
|
```dart
|
|
157
181
|
MaterialApp(
|
|
158
182
|
navigatorKey: CallNavigationContext.navigatorKey, // ⚠️ REQUIRED — see warning below
|
|
159
|
-
|
|
160
|
-
return Stack(
|
|
161
|
-
children: [
|
|
162
|
-
child!,
|
|
163
|
-
const CometChatDisplayIncomingCallOverlay(),
|
|
164
|
-
],
|
|
165
|
-
);
|
|
166
|
-
},
|
|
183
|
+
home: const AppRoot(), // your existing root
|
|
167
184
|
);
|
|
168
185
|
```
|
|
169
186
|
|
|
170
|
-
|
|
187
|
+
That's it. No `Stack`, no `builder` wrapper, no mounting of an "overlay widget" — once `enableCalls = true` is in your `UIKitSettingsBuilder`, the kit's `CallEventService` shows + dismisses `IncomingCallOverlay` for you when foreground rings happen.
|
|
188
|
+
|
|
189
|
+
**⚠️ `navigatorKey: CallNavigationContext.navigatorKey` is REQUIRED on MaterialApp — still active in v6.0.1 GA.** The kit's `CometChatCallButtons` and outgoing-call flow navigate via `CallNavigationContext.navigatorKey.currentContext`. Without this line, `CometChat.initiateCall` succeeds (CALL-TRAP confirms `onSuccess` fires with a valid sessionId) but `currentContext` is null so `CometChatOutgoingCall` never mounts. Symptom: user taps call button, peer rings, but the Flutter app shows nothing. **Note: the vendor's own 6.0.1 sample app (`examples/sample_app`) is broken for calls on mobile out-of-the-box** — its `main.dart` sets `navigatorKey: kIsWeb ? CallNavigationContext.navigatorKey : null`, i.e. it wires the key **only on web** and passes `null` on Android/iOS, so the outgoing-call screen never mounts on a device (validated on Pixel 3). The kit's *other* sample (`examples/ai_sample_app`) sets it **unconditionally** (`navigatorKey: navigatorKey` + `CallNavigationContext.navigatorKey = navigatorKey`) — that is the correct, device-safe form this skill prescribes. **Wire `navigatorKey: CallNavigationContext.navigatorKey` unconditionally** (do NOT gate it on `kIsWeb` like `sample_app` does); don't copy `sample_app`'s `main.dart` verbatim.
|
|
171
190
|
|
|
172
191
|
Import: `import 'package:cometchat_chat_uikit/cometchat_calls_uikit.dart' show CallNavigationContext;` (use `show` to avoid a name collision with kit-exported `IncomingCallOverlay`).
|
|
173
192
|
|
|
174
|
-
|
|
193
|
+
**✅ Outgoing → in-call screen transition is FIXED in v6.0.1 GA.** (It was broken in v6.0.0-beta2 — the outgoing-call screen stayed on "Calling…" indefinitely after the peer accepted.) Validated end-to-end 2026-05-27 on Pixel 3 with full CALL-TRAP instrumentation: with the navigatorKey wired (above), when the peer accepts, the kit's `OutgoingCallBloc` swaps the outgoing screen for the in-call surface automatically (via the kit's internal call-overlay — `CallScreenOverlay.show()`), transitioning from `CometChatOutgoingCall` ("Calling…") to the in-call view — observed call-duration timer ticking + WebRTC rendering frames @ ~27 fps. The v6.0.0 changelog's "Refreshed BLoC implementations across … call buttons, and ongoing call flows" was the fix. No client-side workaround needed beyond the navigatorKey wiring.
|
|
175
194
|
|
|
176
|
-
In standalone mode, `
|
|
195
|
+
In standalone mode, `flutter_callkit_incoming` (the external package you add) owns the OS-level ring UI; the kit's in-app overlay only fires when the app is foregrounded.
|
|
177
196
|
|
|
178
197
|
---
|
|
179
198
|
|
|
@@ -184,19 +203,14 @@ In standalone mode, `native_call_kit` owns the OS-level ring UI; the in-app over
|
|
|
184
203
|
dependencies:
|
|
185
204
|
flutter:
|
|
186
205
|
sdk: flutter
|
|
187
|
-
cometchat_chat_uikit: ^6.0
|
|
206
|
+
cometchat_chat_uikit: ^6.0 # calls bundled in
|
|
188
207
|
permission_handler: ^11.0.0
|
|
189
208
|
flutter_callkit_incoming: ^2.0.0 # standalone — VoIP UI bridge
|
|
190
209
|
firebase_messaging: ^14.0.0 # standalone — Android FCM
|
|
191
210
|
firebase_core: ^2.0.0
|
|
192
211
|
```
|
|
193
212
|
|
|
194
|
-
|
|
195
|
-
```yaml
|
|
196
|
-
cometchat_chat_uikit:
|
|
197
|
-
hosted: https://dart.cloudsmith.io/cometchat/cometchat/
|
|
198
|
-
version: ^6.0.0-beta2
|
|
199
|
-
```
|
|
213
|
+
> **V6 GA is on pub.dev — use the plain dependency above, NOT a Cloudsmith `hosted:` stanza.** Cloudsmith (`dart.cloudsmith.io/cometchat/cometchat/`) only hosts the pre-GA `6.0.0-beta*` builds, so a `hosted:` install of `^6.0.x` fails with "version solving failed". The GA range resolves `6.0.1`/`6.0.2`/`6.0.3` from pub.dev. (Cloudsmith is only for the legacy **V5** packages.)
|
|
200
214
|
|
|
201
215
|
Init (additive mode):
|
|
202
216
|
|
|
@@ -207,7 +221,7 @@ import 'package:cometchat_chat_uikit/cometchat_calls_uikit.dart';
|
|
|
207
221
|
void main() async {
|
|
208
222
|
WidgetsFlutterBinding.ensureInitialized();
|
|
209
223
|
|
|
210
|
-
final settings = (
|
|
224
|
+
final settings = (UIKitSettingsBuilder()
|
|
211
225
|
..appId = CometChatConfig.appId
|
|
212
226
|
..region = CometChatConfig.region
|
|
213
227
|
..authKey = CometChatConfig.authKey
|
|
@@ -247,7 +261,6 @@ call_ui/src/
|
|
|
247
261
|
├── call_operations/ # Shared DI / use cases / repositories (CallOperationsServiceLocator)
|
|
248
262
|
├── call_bubble/ # CometChatCallBubble — call-event bubble in message list (auto-rendered)
|
|
249
263
|
├── call_settings/ # CometChatUIKitCalls, CallNavigationContext
|
|
250
|
-
├── native_call_kit/ # iOS CallKit / Android ConnectionService bridge
|
|
251
264
|
├── utils/ # CallUtils, CallStateService, CallPermissions
|
|
252
265
|
├── call_event_service.dart # Centralized call event handling
|
|
253
266
|
└── calling_configuration.dart # Top-level config object
|
|
@@ -258,9 +271,9 @@ call_ui/src/
|
|
|
258
271
|
| Widget | Purpose | Notes |
|
|
259
272
|
|---|---|---|
|
|
260
273
|
| `CometChatCallButtons(user:, group:)` | Voice + video buttons | Mutually exclusive `user` / `group`. Use `group:` for group calls (meetings). |
|
|
261
|
-
| `CometChatIncomingCall(call:, user:, onAccept:, onDecline:)` | In-app foreground ring UI | `onAccept`/`onDecline` are `(BuildContext, Call) -> void`. Custom view slots: `titleView`, `subTitleView`, `leadingView`, `trailingView`. |
|
|
274
|
+
| `CometChatIncomingCall(call:, user:, onAccept:, onDecline:)` | In-app foreground ring UI | `onAccept`/`onDecline` are `(BuildContext, Call) -> void`. Custom view slots: `titleView`, `subTitleView`, `leadingView`, `trailingView`. ⚠️ **Param-name quirk:** this widget's settings param is `callSettingsBuilder:` (takes a `SessionSettingsBuilder`), NOT `sessionSettingsBuilder:` like Ongoing/Outgoing — verified `lib/call_ui/src/incoming_call/cometchat_incoming_call.dart`. |
|
|
262
275
|
| `CometChatOutgoingCall(call:, user:, outgoingCallStyle:)` | Dialing UI | Auto-mounted when `initiateCall` is called via the kit. |
|
|
263
|
-
| `CometChatOngoingCall(
|
|
276
|
+
| `CometChatOngoingCall(sessionSettingsBuilder:, sessionId:, callWorkFlow:)` | Active call view | **Param is `sessionSettingsBuilder:` NOT `callSettingsBuilder:`** (verified `lib/call_ui/src/ongoing_call/cometchat_ongoing_call.dart` constructor). `callWorkFlow: CallWorkFlow.directCalling` or `CallWorkFlow.defaultCalling`. Set `resizeToAvoidBottomInset: false` on host Scaffold. |
|
|
264
277
|
| `CometChatCallLogs(onItemClick:, callLogsStyle:)` | Paginated history | Clean Architecture + BLoC; `CallLogsServiceLocator` is initialized automatically when the widget mounts. |
|
|
265
278
|
| `CometChatCallBubble` | Call-event message bubble | Auto-rendered for call-type messages in `CometChatMessageList`. |
|
|
266
279
|
|
|
@@ -314,7 +327,7 @@ When `product === "voice-video"` and there is no v6 chat integration.
|
|
|
314
327
|
Calls SDK ONLY. NO Chat SDK, NO UIKit. Same SDK as v5 (`cometchat_calls_sdk`). Scaffold:
|
|
315
328
|
|
|
316
329
|
1. **`pubspec.yaml`** — `cometchat_calls_sdk: ^5.0.0` + `flutter_bloc` + `equatable` + `permission_handler` ONLY.
|
|
317
|
-
2. **`lib/main.dart`** — `CometChatCalls.init(appId
|
|
330
|
+
2. **`lib/main.dart`** — `CometChatCalls.init((CallAppSettingBuilder()..appId = APP_ID..region = REGION).build(), onSuccess: ..., onError: ...)` (named-callback form; `CallAppSettingBuilder` exposes only `appId`/`region`/host overrides — there is NO `authKey` field. Verified `cometchat_calls_sdk-5.0.2` `src/builder/call_app_settings_request.dart` + `src/plugin/cometchatcalls.dart:172`). Permission requests. NO Chat SDK init.
|
|
318
331
|
3. **`lib/cubits/call_session_cubit.dart`** — Cubit implements `SessionStatusListeners`. `CometChatCalls.joinSession(sessionId:, sessionSettings: SessionSettingsBuilder().build(), onSuccess:, onError:)`. Renders the returned `Widget?` via `SizedBox.expand`. See `references/call-session.md`.
|
|
319
332
|
4. **`lib/screens/call_room.dart`** — `BlocConsumer` for auto-pop on idle transition.
|
|
320
333
|
5. **Native config** — Camera + microphone permissions only.
|
|
@@ -326,20 +339,20 @@ Calls SDK ONLY. NO Chat SDK, NO UIKit. Same SDK as v5 (`cometchat_calls_sdk`). S
|
|
|
326
339
|
Dual-SDK + UIKit. Scaffold:
|
|
327
340
|
|
|
328
341
|
1. **`lib/main.dart`** — Chat SDK + Calls SDK init (no UIKit), permission requests, `flutter_callkit_incoming` + Firebase setup.
|
|
329
|
-
2. **`lib/services/voip_service.dart`** — FCM + PushKit + `
|
|
342
|
+
2. **`lib/services/voip_service.dart`** — FCM + PushKit + `flutter_callkit_incoming` bridge (you write this; the kit ships no VoIP/ring-UI module).
|
|
330
343
|
3. **`lib/widgets/call_button.dart`** — Voice + video buttons next to a contact.
|
|
331
344
|
4. **`lib/screens/ongoing_call_screen.dart`** — `CometChatCalls.joinSession(sessionId:, sessionSettings:, onSuccess:, onError:)` with Widget rendered via `SizedBox.expand`. Cubit-driven state.
|
|
332
345
|
5. **`lib/screens/call_logs_screen.dart`** — `/calls` route.
|
|
333
|
-
6. **`MaterialApp
|
|
346
|
+
6. **`MaterialApp`** — `navigatorKey: CallNavigationContext.navigatorKey` wired; `enableCalls = true` on UIKitSettingsBuilder shows the foreground overlay automatically (rule 1.7). No widget mount needed.
|
|
334
347
|
7. **Native config** — same as V5 standalone (Info.plist + AndroidManifest + Firebase config files).
|
|
335
348
|
|
|
336
349
|
## 5. Additive integration
|
|
337
350
|
|
|
338
351
|
When chat is already integrated. The skill:
|
|
339
352
|
|
|
340
|
-
1. Confirms `cometchat_chat_uikit` is on `^6.0.
|
|
353
|
+
1. Confirms `cometchat_chat_uikit` is on `^6.0.1` — calls are already bundled.
|
|
341
354
|
2. Patches the `CometChatUIKit.init` call to add `CometChatUIKitCalls.init` in the success callback (rule 1.1).
|
|
342
|
-
3.
|
|
355
|
+
3. Confirms `..enableCalls = true` is set on UIKitSettingsBuilder (rule 1.0) so foreground overlay fires automatically; ensures `navigatorKey: CallNavigationContext.navigatorKey` is on MaterialApp (rule 1.7).
|
|
343
356
|
4. Confirms `CometChatMessageHeader` shows call buttons by default (`hideVoiceCallButton: false`, `hideVideoCallButton: false`).
|
|
344
357
|
5. Optionally adds `CometChatCallLogs` as a tab/screen.
|
|
345
358
|
6. VoIP push: opt-in.
|
|
@@ -359,10 +372,11 @@ When chat is already integrated. The skill:
|
|
|
359
372
|
|
|
360
373
|
**Static:**
|
|
361
374
|
|
|
362
|
-
- [ ] `cometchat_chat_uikit ^6.0.
|
|
375
|
+
- [ ] `cometchat_chat_uikit ^6.0.1` in pubspec.yaml (V6 bundles calls — no separate calls package)
|
|
363
376
|
- [ ] `CometChatUIKitCalls.init` called inside `CometChatUIKit.init`'s `onSuccess` (rule 1.1)
|
|
364
377
|
- [ ] `CometChatUIKitCalls.init` called exactly once per app lifecycle
|
|
365
|
-
- [ ] `
|
|
378
|
+
- [ ] `..enableCalls = true` on UIKitSettingsBuilder + `navigatorKey: CallNavigationContext.navigatorKey` on MaterialApp (rule 1.7) — no manual overlay widget mount
|
|
379
|
+
- [ ] No reference to `CometChatDisplayIncomingCallOverlay` (fictional class — does NOT exist; ENG-35698)
|
|
366
380
|
- [ ] iOS `Info.plist`: NSCameraUsageDescription + NSMicrophoneUsageDescription + UIBackgroundModes (audio + voip + remote-notification)
|
|
367
381
|
- [ ] Android `minSdk = 26`, ProGuard rules `-keep class com.cometchat.** { *; }`
|
|
368
382
|
- [ ] Android manifest: four FOREGROUND_SERVICE_* permissions + MANAGE_OWN_CALLS + BIND_TELECOM_CONNECTION_SERVICE
|
|
@@ -384,6 +398,7 @@ When chat is already integrated. The skill:
|
|
|
384
398
|
|
|
385
399
|
## 8. Pointers
|
|
386
400
|
|
|
401
|
+
- `references/advanced-features.md` — Recording, Virtual Background, Audio Modes, Picture-in-Picture, Screen-share (receive) — source-verified against `cometchat_calls_sdk` 5.0.2
|
|
387
402
|
- `cometchat-calls` — dispatcher
|
|
388
403
|
- `cometchat-flutter-v6-core` — UIKitSettings, init/login order, init guard rules
|
|
389
404
|
- `cometchat-flutter-v6-events` — Bloc event streams
|
|
@@ -394,5 +409,5 @@ When chat is already integrated. The skill:
|
|
|
394
409
|
|
|
395
410
|
## Known external SDK gotchas (worth surfacing in any agent message)
|
|
396
411
|
|
|
397
|
-
- `startSession` on Android can return `null` with a 5-second timeout and no error feedback —
|
|
398
|
-
-
|
|
412
|
+
- `startSession` on Android can return `null` with a 5-second timeout and no error feedback — **field-observed on Pixel 3, not confirmed in the SDK source**; retry once before surfacing failure. (Audio vs video is driven by the Chat-SDK `Call.type` string — there is no `SessionType` enum in the calls SDK.)
|
|
413
|
+
- Audio-only calls have been observed opening with video on Android in some builds (field-observed; verify against your installed SDK version) — set the call type explicitly via the Chat-SDK `Call(type: "audio")` and confirm the rendered surface.
|