@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.
Files changed (233) hide show
  1. package/LICENSE +21 -0
  2. package/bin/install.js +27 -0
  3. package/package.json +14 -1
  4. package/skills/cometchat/SKILL.md +233 -69
  5. package/skills/cometchat/references/asking-questions.md +48 -0
  6. package/skills/cometchat-a11y/SKILL.md +3 -2
  7. package/skills/cometchat-android-v5/SKILL.md +2 -1
  8. package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
  9. package/skills/cometchat-android-v5-calls/references/README.md +1 -1
  10. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
  11. package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
  12. package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
  13. package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
  14. package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
  15. package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
  16. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
  17. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
  18. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
  19. package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
  20. package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
  21. package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
  22. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
  23. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
  24. package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
  25. package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
  26. package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
  27. package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
  28. package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
  29. package/skills/cometchat-android-v5-components/SKILL.md +4 -3
  30. package/skills/cometchat-android-v5-core/SKILL.md +5 -3
  31. package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
  32. package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
  33. package/skills/cometchat-android-v5-features/SKILL.md +5 -4
  34. package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
  35. package/skills/cometchat-android-v5-production/SKILL.md +2 -1
  36. package/skills/cometchat-android-v5-push/SKILL.md +2 -3
  37. package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
  38. package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
  39. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
  40. package/skills/cometchat-android-v6/SKILL.md +2 -1
  41. package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
  42. package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
  43. package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
  44. package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
  45. package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
  46. package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
  47. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
  48. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
  49. package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
  50. package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
  51. package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
  52. package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
  53. package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
  54. package/skills/cometchat-android-v6-core/SKILL.md +208 -28
  55. package/skills/cometchat-android-v6-events/SKILL.md +4 -1
  56. package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
  57. package/skills/cometchat-android-v6-features/SKILL.md +26 -2
  58. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
  59. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
  60. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
  61. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
  62. package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
  63. package/skills/cometchat-android-v6-production/SKILL.md +6 -3
  64. package/skills/cometchat-android-v6-push/SKILL.md +43 -2
  65. package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
  66. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
  67. package/skills/cometchat-angular-calls/SKILL.md +256 -389
  68. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
  69. package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
  70. package/skills/cometchat-angular-calls/references/call-session.md +2 -2
  71. package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
  72. package/skills/cometchat-angular-calls/references/device-management.md +53 -34
  73. package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
  74. package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
  75. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
  76. package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
  77. package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
  78. package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
  79. package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
  80. package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
  81. package/skills/cometchat-angular-components/SKILL.md +149 -620
  82. package/skills/cometchat-angular-core/SKILL.md +232 -312
  83. package/skills/cometchat-angular-customization/SKILL.md +415 -223
  84. package/skills/cometchat-angular-features/SKILL.md +216 -334
  85. package/skills/cometchat-angular-patterns/SKILL.md +168 -359
  86. package/skills/cometchat-angular-placement/SKILL.md +189 -560
  87. package/skills/cometchat-angular-production/SKILL.md +241 -92
  88. package/skills/cometchat-angular-push/SKILL.md +280 -294
  89. package/skills/cometchat-angular-testing/SKILL.md +430 -158
  90. package/skills/cometchat-angular-theming/SKILL.md +190 -265
  91. package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
  92. package/skills/cometchat-astro-patterns/SKILL.md +2 -1
  93. package/skills/cometchat-calls/SKILL.md +25 -19
  94. package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
  95. package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
  96. package/skills/cometchat-calls/references/use-case-support.md +3 -4
  97. package/skills/cometchat-calls/references/use-case-team.md +23 -12
  98. package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
  99. package/skills/cometchat-components/SKILL.md +163 -25
  100. package/skills/cometchat-core/SKILL.md +255 -19
  101. package/skills/cometchat-customization/SKILL.md +50 -25
  102. package/skills/cometchat-features/SKILL.md +313 -34
  103. package/skills/cometchat-flutter-v5/SKILL.md +10 -4
  104. package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
  105. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
  106. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
  107. package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
  108. package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
  109. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
  110. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
  111. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
  112. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
  113. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
  114. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
  115. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
  116. package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
  117. package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
  118. package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
  119. package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
  120. package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
  121. package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
  122. package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
  123. package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
  124. package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
  125. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
  126. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
  127. package/skills/cometchat-flutter-v6/SKILL.md +17 -16
  128. package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
  129. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
  130. package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
  131. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
  132. package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
  133. package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
  134. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
  135. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
  136. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
  137. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
  138. package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
  139. package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
  140. package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
  141. package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
  142. package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
  143. package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
  144. package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
  145. package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
  146. package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
  147. package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
  148. package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
  149. package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
  150. package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
  151. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
  152. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
  153. package/skills/cometchat-i18n/SKILL.md +139 -78
  154. package/skills/cometchat-ios/SKILL.md +4 -2
  155. package/skills/cometchat-ios-calls/SKILL.md +225 -95
  156. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
  157. package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
  158. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
  159. package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
  160. package/skills/cometchat-ios-calls/references/call-session.md +51 -54
  161. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
  162. package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
  163. package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
  164. package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
  165. package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
  166. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
  167. package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
  168. package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
  169. package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
  170. package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
  171. package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
  172. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
  173. package/skills/cometchat-ios-components/SKILL.md +200 -12
  174. package/skills/cometchat-ios-core/SKILL.md +173 -45
  175. package/skills/cometchat-ios-customization/SKILL.md +276 -110
  176. package/skills/cometchat-ios-features/SKILL.md +64 -36
  177. package/skills/cometchat-ios-placement/SKILL.md +15 -12
  178. package/skills/cometchat-ios-production/SKILL.md +12 -4
  179. package/skills/cometchat-ios-push/SKILL.md +53 -19
  180. package/skills/cometchat-ios-testing/SKILL.md +14 -9
  181. package/skills/cometchat-ios-theming/SKILL.md +39 -3
  182. package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
  183. package/skills/cometchat-native-bare-patterns/SKILL.md +34 -17
  184. package/skills/cometchat-native-calls/SKILL.md +28 -16
  185. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
  186. package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
  187. package/skills/cometchat-native-calls/references/call-session.md +2 -2
  188. package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
  189. package/skills/cometchat-native-calls/references/device-management.md +53 -30
  190. package/skills/cometchat-native-calls/references/group-calls.md +35 -30
  191. package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
  192. package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
  193. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
  194. package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
  195. package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
  196. package/skills/cometchat-native-calls/references/share-invite.md +7 -5
  197. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
  198. package/skills/cometchat-native-components/SKILL.md +84 -52
  199. package/skills/cometchat-native-core/SKILL.md +101 -32
  200. package/skills/cometchat-native-customization/SKILL.md +150 -28
  201. package/skills/cometchat-native-expo-patterns/SKILL.md +57 -26
  202. package/skills/cometchat-native-features/SKILL.md +23 -16
  203. package/skills/cometchat-native-placement/SKILL.md +19 -10
  204. package/skills/cometchat-native-production/SKILL.md +9 -3
  205. package/skills/cometchat-native-push/SKILL.md +2 -1
  206. package/skills/cometchat-native-testing/SKILL.md +1 -2
  207. package/skills/cometchat-native-theming/SKILL.md +54 -29
  208. package/skills/cometchat-native-troubleshooting/SKILL.md +9 -3
  209. package/skills/cometchat-nextjs-patterns/SKILL.md +20 -6
  210. package/skills/cometchat-placement/SKILL.md +42 -3
  211. package/skills/cometchat-production/SKILL.md +12 -5
  212. package/skills/cometchat-react-calls/SKILL.md +220 -10
  213. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
  214. package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
  215. package/skills/cometchat-react-calls/references/call-session.md +1 -1
  216. package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
  217. package/skills/cometchat-react-calls/references/device-management.md +55 -51
  218. package/skills/cometchat-react-calls/references/group-calls.md +18 -23
  219. package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
  220. package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
  221. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
  222. package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
  223. package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
  224. package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
  225. package/skills/cometchat-react-calls/references/share-invite.md +4 -5
  226. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
  227. package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
  228. package/skills/cometchat-react-patterns/SKILL.md +44 -4
  229. package/skills/cometchat-react-push/SKILL.md +258 -72
  230. package/skills/cometchat-react-router-patterns/SKILL.md +10 -4
  231. package/skills/cometchat-react-testing/SKILL.md +14 -5
  232. package/skills/cometchat-theming/SKILL.md +181 -18
  233. 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
- User? getLoggedInUser() => CometChatUIKit.getLoggedInUser();
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
- CometChatUIKit.sendTextMessage(textMessage: message, onSuccess: completer.complete, onError: completer.completeError);
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
- loginCompleter.complete(User(uid: 'cometchat-uid-1'));
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
- message: TextMessage(text: 'Hello', senderUid: 'alice'),
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 `PNRegistry.registerPNService(token, isFcm, isVoip)` |
70
- | Notifications after logout | Token not unregistered | Call `PNRegistry.unregisterPNService()` before logout |
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 26` in `android/app/build.gradle` |
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 no `BuilderSettings` | `BuilderSettings`, `BuilderColor`, `BuilderTypography` |
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`, `groupMembersStyle`, `subtitleView`, `trailingView`, `onItemTap` (`Function(GroupMember)?` — **no BuildContext**), `selectionMode`, `onSelection`.
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-beta2"
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:6.0.0-beta2 --hosted-url https://dart.cloudsmith.io/cometchat/cometchat/
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 (MUST use resizeToAvoidBottomInset: false)
156
+ // 4. Messages screen on ^6.0.1 use resizeToAvoidBottomInset: true (or omit it)
156
157
  Scaffold(
157
- resizeToAvoidBottomInset: false, // REQUIRED
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: false, // REQUIRED composer handles keyboard
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
- ## Top 10 Error Debugging
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 compensation | Scaffold `resizeToAvoidBottomInset` is true | Set to `false` when using composer |
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.getLoggedInUser()` first |
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: false`
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,13 +1,12 @@
1
1
  ---
2
2
  name: cometchat-flutter-v6-calls
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, native_call_kit module (iOS CallKit + Android ConnectionService), CallOperationsServiceLocator lifecycle, FCM + PushKit VoIP push, and additive-vs-standalone modes."
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
5
  compatibility: "Flutter >= 2.5, Dart >= 3.0; cometchat_chat_uikit ^6.0.1 (calls bundled in); minSdk 26+ on Android; iOS 13+"
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"
10
- tags: "cometchat flutter v6 beta calls voice video webrtc bloc incoming outgoing ongoing call-logs callkit pushkit connectionservice fcm voip-push native-call-kit call-operations service-locator"
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
@@ -30,42 +29,63 @@ Production-grade voice + video calling for Flutter UIKit v6 (stable, Bloc-based)
30
29
 
31
30
  **Ground truth:**
32
31
  - SDK source — installed `cometchat_chat_uikit@6.0.1` artifacts under `~/.pub-cache/`
33
- - Sample app — `~/Downloads/calls-sdk/calls-sdk-flutter-5/sample-apps/` (V5 sample; V6 sample app may not exist yet — verify before citing)
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 is its own step (v5+)
39
+ ### 1.0 Calls SDK login handled automatically when `enableCalls: true` (ENG-35699)
41
40
 
42
- Same as v5 cohort the v5 Calls SDK has its own auth state, separate from the Chat SDK. After `CometChat.login` succeeds, you MUST also call `CometChatCalls.login` — without it, the FIRST calls API call throws **"auth token cannot be null"**.
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's `CometChatUIKitCalls.init()` initializes the SDK but does not handle login. Login still needs to happen explicitly after the user signs in via `CometChatUIKit.login`:
45
+ **The V6 UIKit recipe (recommended 99% of integrations):**
45
46
 
46
47
  ```dart
47
- import 'package:cometchat_sdk/cometchat_sdk.dart';
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
- // After CometChatUIKit.login resolves
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: (CometChatException e) { /* surface to user */ },
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
- - Chat SDK persists login via shared preferences. The **Calls SDK does NOT** always check `CometChatCalls.getLoggedInUser()` on app start and re-login if it returns null.
68
- - Even though V6 bundles the call UI into `CometChatUIKit`, the underlying Calls SDK login is still mandatory and separate.
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 — `native_call_kit` module + FCM + PushKit bridge
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
- V6 ships a `native_call_kit` sub-module inside `cometchat_chat_uikit` that wraps CallKit (iOS) and ConnectionService (Android). The skill still wires:
121
+ Wire VoIP push with:
100
122
 
101
- - **`firebase_messaging`** — FCM data messages on Android
102
- - **iOS PushKit** same platform-channel bridge as v5 (Flutter has no first-party PushKit plugin)
103
- - **`native_call_kit` API** — Dart-side handlers for incoming-call payloads OS-level ring UI
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, opt-in. In standalone, mandatory.
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.** One of the `cometchat_calls_uikit` transitive deps still pulls in the legacy `com.android.support:support-compat:26.1.0` AAR in V6. Without Jetifier, AGP fails with `Duplicate class android.support.v4.*` errors. Set in `android/gradle.properties`:
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.requestCallPermissions(callType: CallType.video);
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 mounted at app root
174
+ ### 1.7 IncomingCall automatic when `enableCalls = true` (ENG-35698)
153
175
 
154
- V6 exposes the incoming-call overlay via `CometChatDisplayIncomingCallOverlay` mounted in `MaterialApp`'s `builder`:
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
- builder: (context, child) {
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
- **⚠️ `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 missing this line and is broken out-of-the-box** — its `user_info_screen.dart` reads `CallNavigationContext.navigatorKey.currentContext` but `main.dart`'s MaterialApp never sets the key. Don't copy the vendor sample's `main.dart` verbatim; add the navigatorKey.
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
- **✅ 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` fires `pushReplacement` and the screen transitions automatically from `CometChatOutgoingCall` ("Calling…") to the in-call surface — 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.
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, `native_call_kit` owns the OS-level ring UI; the in-app overlay only fires when the app is foregrounded.
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
 
@@ -191,12 +210,7 @@ dependencies:
191
210
  firebase_core: ^2.0.0
192
211
  ```
193
212
 
194
- If pub.dev resolution lags, use the Cloudsmith hosted pin:
195
- ```yaml
196
- cometchat_chat_uikit:
197
- hosted: https://dart.cloudsmith.io/cometchat/cometchat/
198
- version: ^6.0.1
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 = (UIKitSettings.builder()
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(callSettingsBuilder:, sessionId:, callWorkFlow:)` | Active call view | `callWorkFlow: CallWorkFlow.directCalling` or `CallWorkFlow.defaultCalling`. Set `resizeToAvoidBottomInset: false` on host Scaffold. |
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, region, authKey)`. Permission requests. NO Chat SDK init.
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,11 +339,11 @@ 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 + `native_call_kit` bridge.
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.builder`** — `CometChatDisplayIncomingCallOverlay` for foreground rings (rule 1.7).
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
@@ -339,7 +352,7 @@ When chat is already integrated. The skill:
339
352
 
340
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. Adds `CometChatDisplayIncomingCallOverlay` to `MaterialApp.builder` (rule 1.7).
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.
@@ -362,7 +375,8 @@ When chat is already integrated. The skill:
362
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
- - [ ] `CometChatDisplayIncomingCallOverlay` mounted in `MaterialApp.builder` (rule 1.7)
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 — known platform issue; retry once before surfacing failure.
398
- - `SessionType.audio` is ignored on Android in some V6 SDK buildsalways opens with video. External SDK bug; track upstream.
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.
@@ -29,7 +29,7 @@ Future<void> main() async {
29
29
  final settings = UIKitSettingsBuilder()
30
30
  ..setAppId(APP_ID)
31
31
  ..setRegion(REGION)
32
- ..enableCalling(); // NEW
32
+ ..enableCalls = true; // canonical V6 API — verified against cometchat_chat_uikit-6.0.1 // NEW
33
33
 
34
34
  await CometChatUIKit.init(uiKitSettings: settings.build());
35
35
  runApp(const MyApp());
@@ -105,7 +105,9 @@ class CallBloc extends Bloc<CallEvent, CallState> {
105
105
  }
106
106
 
107
107
  Future<void> _onEndCall(EndCall event, Emitter<CallState> emit) async {
108
- CometChatCalls.leaveSession();
108
+ // leaveSession is an instance method on CallSession
109
+ // (cometchat_calls_sdk-5.0.2 src/call_session.dart:272), not static.
110
+ await CallSession.getInstance()?.leaveSession();
109
111
  await CometChat.endCall(event.sessionId);
110
112
  // V6's bundled flow: no additional FlutterCallkitIncoming step;
111
113
  // the kit handles it
@@ -119,7 +121,7 @@ class CallBloc extends Bloc<CallEvent, CallState> {
119
121
  ## Verification checklist
120
122
 
121
123
  - [ ] `cometchat_chat_uikit: ^6.0` (or higher V6) in pubspec
122
- - [ ] `..enableCalling()` chained in UIKitSettingsBuilder
124
+ - [ ] `..enableCalls = true` chained in UIKitSettingsBuilder
123
125
  - [ ] Native config (iOS + Android) same as V5
124
126
  - [ ] `CometChatIncomingCall` sibling-overlay at root
125
127
  - [ ] VoIP push registration via CallPushBloc post-login