@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.
Files changed (234) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +33 -12
  3. package/bin/install.js +59 -4
  4. package/package.json +14 -1
  5. package/skills/cometchat/SKILL.md +460 -77
  6. package/skills/cometchat/references/asking-questions.md +48 -0
  7. package/skills/cometchat-a11y/SKILL.md +3 -2
  8. package/skills/cometchat-android-v5/SKILL.md +2 -1
  9. package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
  10. package/skills/cometchat-android-v5-calls/references/README.md +1 -1
  11. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
  12. package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
  13. package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
  14. package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
  15. package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
  16. package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
  17. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
  18. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
  19. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
  20. package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
  21. package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
  22. package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
  23. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
  24. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
  25. package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
  26. package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
  27. package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
  28. package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
  29. package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
  30. package/skills/cometchat-android-v5-components/SKILL.md +4 -3
  31. package/skills/cometchat-android-v5-core/SKILL.md +20 -2
  32. package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
  33. package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
  34. package/skills/cometchat-android-v5-features/SKILL.md +5 -4
  35. package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
  36. package/skills/cometchat-android-v5-production/SKILL.md +2 -1
  37. package/skills/cometchat-android-v5-push/SKILL.md +2 -3
  38. package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
  39. package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
  40. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
  41. package/skills/cometchat-android-v6/SKILL.md +2 -1
  42. package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
  43. package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
  44. package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
  45. package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
  46. package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
  47. package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
  48. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
  49. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
  50. package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
  51. package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
  52. package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
  53. package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
  54. package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
  55. package/skills/cometchat-android-v6-core/SKILL.md +389 -9
  56. package/skills/cometchat-android-v6-events/SKILL.md +4 -1
  57. package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
  58. package/skills/cometchat-android-v6-features/SKILL.md +26 -2
  59. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
  60. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
  61. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
  62. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
  63. package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
  64. package/skills/cometchat-android-v6-production/SKILL.md +6 -3
  65. package/skills/cometchat-android-v6-push/SKILL.md +43 -2
  66. package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
  67. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
  68. package/skills/cometchat-angular-calls/SKILL.md +256 -389
  69. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
  70. package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
  71. package/skills/cometchat-angular-calls/references/call-session.md +2 -2
  72. package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
  73. package/skills/cometchat-angular-calls/references/device-management.md +53 -34
  74. package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
  75. package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
  76. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
  77. package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
  78. package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
  79. package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
  80. package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
  81. package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
  82. package/skills/cometchat-angular-components/SKILL.md +149 -620
  83. package/skills/cometchat-angular-core/SKILL.md +235 -293
  84. package/skills/cometchat-angular-customization/SKILL.md +415 -223
  85. package/skills/cometchat-angular-features/SKILL.md +216 -334
  86. package/skills/cometchat-angular-patterns/SKILL.md +168 -359
  87. package/skills/cometchat-angular-placement/SKILL.md +189 -560
  88. package/skills/cometchat-angular-production/SKILL.md +241 -92
  89. package/skills/cometchat-angular-push/SKILL.md +280 -294
  90. package/skills/cometchat-angular-testing/SKILL.md +430 -158
  91. package/skills/cometchat-angular-theming/SKILL.md +190 -265
  92. package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
  93. package/skills/cometchat-astro-patterns/SKILL.md +22 -1
  94. package/skills/cometchat-calls/SKILL.md +25 -19
  95. package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
  96. package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
  97. package/skills/cometchat-calls/references/use-case-support.md +3 -4
  98. package/skills/cometchat-calls/references/use-case-team.md +23 -12
  99. package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
  100. package/skills/cometchat-components/SKILL.md +163 -25
  101. package/skills/cometchat-core/SKILL.md +412 -13
  102. package/skills/cometchat-customization/SKILL.md +50 -25
  103. package/skills/cometchat-features/SKILL.md +313 -34
  104. package/skills/cometchat-flutter-v5/SKILL.md +10 -4
  105. package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
  106. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
  107. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
  108. package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
  109. package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
  110. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
  111. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
  112. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
  113. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
  114. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
  115. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
  116. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
  117. package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
  118. package/skills/cometchat-flutter-v5-core/SKILL.md +20 -2
  119. package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
  120. package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
  121. package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
  122. package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
  123. package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
  124. package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
  125. package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
  126. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
  127. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
  128. package/skills/cometchat-flutter-v6/SKILL.md +17 -16
  129. package/skills/cometchat-flutter-v6-calls/SKILL.md +78 -63
  130. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +8 -6
  131. package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
  132. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
  133. package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
  134. package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
  135. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
  136. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
  137. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
  138. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
  139. package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
  140. package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
  141. package/skills/cometchat-flutter-v6-core/SKILL.md +348 -10
  142. package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
  143. package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
  144. package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
  145. package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
  146. package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
  147. package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
  148. package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
  149. package/skills/cometchat-flutter-v6-push/SKILL.md +43 -21
  150. package/skills/cometchat-flutter-v6-testing/SKILL.md +6 -6
  151. package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
  152. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
  153. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
  154. package/skills/cometchat-i18n/SKILL.md +139 -78
  155. package/skills/cometchat-ios/SKILL.md +4 -2
  156. package/skills/cometchat-ios-calls/SKILL.md +225 -95
  157. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
  158. package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
  159. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
  160. package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
  161. package/skills/cometchat-ios-calls/references/call-session.md +51 -54
  162. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
  163. package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
  164. package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
  165. package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
  166. package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
  167. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
  168. package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
  169. package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
  170. package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
  171. package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
  172. package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
  173. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
  174. package/skills/cometchat-ios-components/SKILL.md +200 -12
  175. package/skills/cometchat-ios-core/SKILL.md +281 -11
  176. package/skills/cometchat-ios-customization/SKILL.md +276 -110
  177. package/skills/cometchat-ios-features/SKILL.md +64 -36
  178. package/skills/cometchat-ios-placement/SKILL.md +15 -12
  179. package/skills/cometchat-ios-production/SKILL.md +12 -4
  180. package/skills/cometchat-ios-push/SKILL.md +53 -19
  181. package/skills/cometchat-ios-testing/SKILL.md +14 -9
  182. package/skills/cometchat-ios-theming/SKILL.md +39 -3
  183. package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
  184. package/skills/cometchat-native-bare-patterns/SKILL.md +56 -18
  185. package/skills/cometchat-native-calls/SKILL.md +89 -19
  186. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
  187. package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
  188. package/skills/cometchat-native-calls/references/call-session.md +2 -2
  189. package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
  190. package/skills/cometchat-native-calls/references/device-management.md +53 -30
  191. package/skills/cometchat-native-calls/references/group-calls.md +35 -30
  192. package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
  193. package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
  194. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
  195. package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
  196. package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
  197. package/skills/cometchat-native-calls/references/share-invite.md +7 -5
  198. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
  199. package/skills/cometchat-native-components/SKILL.md +91 -57
  200. package/skills/cometchat-native-core/SKILL.md +281 -9
  201. package/skills/cometchat-native-customization/SKILL.md +150 -28
  202. package/skills/cometchat-native-expo-patterns/SKILL.md +77 -27
  203. package/skills/cometchat-native-features/SKILL.md +79 -49
  204. package/skills/cometchat-native-placement/SKILL.md +19 -10
  205. package/skills/cometchat-native-production/SKILL.md +9 -3
  206. package/skills/cometchat-native-push/SKILL.md +2 -1
  207. package/skills/cometchat-native-testing/SKILL.md +1 -2
  208. package/skills/cometchat-native-theming/SKILL.md +54 -29
  209. package/skills/cometchat-native-troubleshooting/SKILL.md +71 -3
  210. package/skills/cometchat-nextjs-patterns/SKILL.md +48 -6
  211. package/skills/cometchat-placement/SKILL.md +42 -3
  212. package/skills/cometchat-production/SKILL.md +12 -5
  213. package/skills/cometchat-react-calls/SKILL.md +220 -10
  214. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
  215. package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
  216. package/skills/cometchat-react-calls/references/call-session.md +1 -1
  217. package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
  218. package/skills/cometchat-react-calls/references/device-management.md +55 -51
  219. package/skills/cometchat-react-calls/references/group-calls.md +18 -23
  220. package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
  221. package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
  222. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
  223. package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
  224. package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
  225. package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
  226. package/skills/cometchat-react-calls/references/share-invite.md +4 -5
  227. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
  228. package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
  229. package/skills/cometchat-react-patterns/SKILL.md +57 -4
  230. package/skills/cometchat-react-push/SKILL.md +258 -72
  231. package/skills/cometchat-react-router-patterns/SKILL.md +43 -4
  232. package/skills/cometchat-react-testing/SKILL.md +14 -5
  233. package/skills/cometchat-theming/SKILL.md +181 -18
  234. package/skills/cometchat-troubleshooting/SKILL.md +40 -20
@@ -9,31 +9,36 @@ Same SDK conceptual API as web/native. Flutter V5 uses GetX for state management
9
9
 
10
10
  ## SDK API
11
11
 
12
+ Raise/lower hand are **instance methods on the `CallSession` singleton**, NOT static on `CometChatCalls` (`cometchat_calls_sdk-5.0.2` `src/call_session.dart:292,306`). Participant hand events arrive via `ParticipantEventListeners`, registered through `CallSession.getInstance()?.addParticipantEventListener(...)` (`src/call_session.dart:74`).
13
+
12
14
  ```dart
13
- import 'package:cometchat_calls_uikit/cometchat_calls_uikit.dart';
15
+ import 'package:cometchat_calls_sdk/cometchat_calls_sdk.dart';
14
16
 
15
17
  // Local user
16
- CometChatCalls.raiseHand();
17
- CometChatCalls.lowerHand();
18
+ CallSession.getInstance()?.raiseHand(); // call_session.dart:292
19
+ CallSession.getInstance()?.lowerHand(); // call_session.dart:306
18
20
 
19
- // Listener — registered via the call event listener attached to the OngoingCall widget
20
- class CallListener implements CometChatCallsEventsListener {
21
+ // Listener — implement the split ParticipantEventListeners interface
22
+ class HandListener implements ParticipantEventListeners {
21
23
  @override
22
- void onParticipantHandRaised(Participant participant) {
23
- // participant.uid, participant.name
24
+ void onParticipantHandRaised(Participant participant) { // participant_event_listeners.dart:30
25
+ // participant.uid, participant.name (both nullable)
24
26
  }
25
27
 
26
28
  @override
27
- void onParticipantHandLowered(Participant participant) {
29
+ void onParticipantHandLowered(Participant participant) { // :33
28
30
  // ...
29
31
  }
30
- // ... other event handlers
32
+ // ... other ParticipantEventListeners methods (no-ops or pass-through)
31
33
  }
32
34
 
33
- // Settings flag
34
- final settings = CallSettingsBuilder()
35
- ..hideRaiseHandButton = true;
36
- final builtSettings = settings.build();
35
+ // Register on the session singleton (inside joinSession.onSuccess):
36
+ CallSession.getInstance()?.addParticipantEventListener(HandListener()); // :74
37
+
38
+ // Settings flag — method on the (non-deprecated) SessionSettingsBuilder.
39
+ final settings = (SessionSettingsBuilder()
40
+ ..hideRaiseHandButton(true)) // session_settings.dart:215
41
+ .build();
37
42
  ```
38
43
 
39
44
  ---
@@ -42,7 +47,7 @@ final builtSettings = settings.build();
42
47
 
43
48
  ```dart
44
49
  import 'package:get/get.dart';
45
- import 'package:cometchat_calls_uikit/cometchat_calls_uikit.dart';
50
+ import 'package:cometchat_calls_sdk/cometchat_calls_sdk.dart';
46
51
 
47
52
  class RaisedParticipant {
48
53
  final String uid;
@@ -51,35 +56,37 @@ class RaisedParticipant {
51
56
  RaisedParticipant({required this.uid, required this.name, required this.raisedAt});
52
57
  }
53
58
 
54
- class RaiseHandController extends GetxController implements CometChatCallsEventsListener {
59
+ class RaiseHandController extends GetxController implements ParticipantEventListeners {
55
60
  final localRaised = false.obs;
56
61
  final raised = <RaisedParticipant>[].obs;
57
62
 
58
63
  void toggle() {
59
64
  if (localRaised.value) {
60
- CometChatCalls.lowerHand();
65
+ CallSession.getInstance()?.lowerHand();
61
66
  } else {
62
- CometChatCalls.raiseHand();
67
+ CallSession.getInstance()?.raiseHand();
63
68
  }
64
69
  localRaised.value = !localRaised.value;
65
70
  }
66
71
 
67
72
  @override
68
73
  void onParticipantHandRaised(Participant p) {
74
+ // Participant.uid / .name are nullable in 5.x.
75
+ final uid = p.uid ?? '';
69
76
  final entry = RaisedParticipant(
70
- uid: p.uid, name: p.name, raisedAt: DateTime.now(),
77
+ uid: uid, name: p.name ?? uid, raisedAt: DateTime.now(),
71
78
  );
72
- raised.removeWhere((r) => r.uid == p.uid);
79
+ raised.removeWhere((r) => r.uid == uid);
73
80
  raised.add(entry);
74
81
  raised.sort((a, b) => a.raisedAt.compareTo(b.raisedAt));
75
82
  }
76
83
 
77
84
  @override
78
85
  void onParticipantHandLowered(Participant p) {
79
- raised.removeWhere((r) => r.uid == p.uid);
86
+ raised.removeWhere((r) => r.uid == (p.uid ?? ''));
80
87
  }
81
88
 
82
- // ... implement other CometChatCallsEventsListener methods (no-ops or pass-through)
89
+ // ... implement other ParticipantEventListeners methods (no-ops or pass-through)
83
90
  }
84
91
  ```
85
92
 
@@ -186,25 +193,29 @@ class RaisedHandsSheet extends StatelessWidget {
186
193
  ## Wiring to the call session
187
194
 
188
195
  ```dart
196
+ RaiseHandController? _handCtrl;
197
+
189
198
  @override
190
199
  void initState() {
191
200
  super.initState();
192
- Get.put(RaiseHandController());
193
-
194
- // Attach to the call session the controller IS the listener
195
- final ctrl = Get.find<RaiseHandController>();
196
- CometChatCalls.addCallEventListener('raise-hand', ctrl);
201
+ _handCtrl = Get.put(RaiseHandController());
202
+ // NOTE: attach the listener inside joinSession.onSuccess (CallSession.getInstance()
203
+ // is null until the session exists). If this widget is mounted only after the
204
+ // session is live, attach here:
205
+ CallSession.getInstance()?.addParticipantEventListener(_handCtrl!); // call_session.dart:74
197
206
  }
198
207
 
199
208
  @override
200
209
  void dispose() {
201
- CometChatCalls.removeCallEventListener('raise-hand');
210
+ if (_handCtrl != null) {
211
+ CallSession.getInstance()?.removeParticipantEventListener(_handCtrl!); // call_session.dart:78
212
+ }
202
213
  Get.delete<RaiseHandController>();
203
214
  super.dispose();
204
215
  }
205
216
  ```
206
217
 
207
- Use a STABLE listener ID ('raise-hand'). Changing IDs across remounts orphans listeners duplicate events fire for each.
218
+ The 5.x SDK identifies listeners by object identity (a `Set`), not a string ID keep the same controller instance you registered and pass it to `removeParticipantEventListener` on dispose.
208
219
 
209
220
  ---
210
221
 
@@ -227,9 +238,9 @@ Web sister reference rules apply, plus Flutter V5-specific:
227
238
  - [ ] `Obx` wraps only reactive parts of the UI
228
239
  - [ ] `Semantics` wrapper on toggle button with `button: true, selected:, label:`
229
240
  - [ ] `SemanticsService.announce` on toggle
230
- - [ ] Stable listener ID for `addCallEventListener` / `removeCallEventListener`
241
+ - [ ] Same controller instance registered via `CallSession.getInstance()?.addParticipantEventListener(ctrl)` and removed via `removeParticipantEventListener(ctrl)` on dispose
231
242
  - [ ] `Get.delete<RaiseHandController>()` in `dispose()`
232
- - [ ] `hideRaiseHandButton: true` in CallSettings if custom UI
243
+ - [ ] `SessionSettingsBuilder()..hideRaiseHandButton(true)` if custom UI
233
244
  - [ ] Real-device smoke: 3 devices (mix of iOS + Android), raise from 2 → host sees both
234
245
  - [ ] TalkBack / VoiceOver announces "Hand raised" / "Hand lowered" on toggle
235
246
 
@@ -10,7 +10,7 @@ Same SDK shape as web/RN. Flutter-specific deltas: GetX-controlled state, flutte
10
10
 
11
11
  ```dart
12
12
  import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
13
- import 'package:cometchat_calls_uikit/cometchat_calls_uikit.dart';
13
+ import 'package:cometchat_sdk/cometchat_sdk.dart'; // Call, CallListener (Chat SDK signaling)
14
14
 
15
15
  class CallSignalingController extends GetxController implements CallListener {
16
16
  final incoming = Rx<Call?>(null);
@@ -56,27 +56,30 @@ class CallSignalingController extends GetxController implements CallListener {
56
56
  Future<void> initiate(String receiverUid, {String type = 'video'}) async {
57
57
  final call = Call(
58
58
  receiverUid: receiverUid,
59
- callType: type == 'video' ? CometChatCallType.video : CometChatCallType.audio,
59
+ type: type == 'video' ? CometChatCallType.video : CometChatCallType.audio, // ctor param is `type`, not `callType`
60
60
  receiverType: CometChatReceiverType.user,
61
61
  );
62
- final result = await CometChat.initiateCall(call: call);
63
- if (result is Call) outgoing.value = result;
62
+ // initiateCall is void + callback: the Call comes back in onSuccess, not via await.
63
+ CometChat.initiateCall(call,
64
+ onSuccess: (Call result) => outgoing.value = result,
65
+ onError: (CometChatException e) => debugPrint(e.message ?? ''));
64
66
  }
65
67
 
66
68
  Future<void> accept(Call call) async {
67
- final result = await CometChat.acceptCall(sessionId: call.sessionId!);
68
- if (result is Call) {
69
- incoming.value = null;
70
- activeSessionId.value = result.sessionId;
71
- }
69
+ // acceptCall takes the sessionID POSITIONALLY + onSuccess/onError; it returns void.
70
+ CometChat.acceptCall(call.sessionId!,
71
+ onSuccess: (Call result) {
72
+ incoming.value = null;
73
+ activeSessionId.value = result.sessionId;
74
+ },
75
+ onError: (CometChatException e) => debugPrint(e.message ?? ''));
72
76
  }
73
77
 
74
78
  Future<void> reject(Call call) async {
75
- await CometChat.rejectCall(
76
- sessionId: call.sessionId!,
77
- status: CallStatus.rejected,
78
- );
79
- incoming.value = null;
79
+ // rejectCall: positional sessionID + status String + onSuccess/onError (void).
80
+ CometChat.rejectCall(call.sessionId!, CometChatCallStatus.rejected,
81
+ onSuccess: (Call result) => incoming.value = null,
82
+ onError: (CometChatException e) => debugPrint(e.message ?? ''));
80
83
  }
81
84
 
82
85
  @override
@@ -62,9 +62,15 @@ void initDeepLinks() {
62
62
  ## SDK API
63
63
 
64
64
  ```dart
65
- final settings = CallSettingsBuilder()
66
- ..setHideShareInviteButton(false);
65
+ import 'package:cometchat_calls_sdk/cometchat_calls_sdk.dart';
67
66
 
67
+ final settings = (SessionSettingsBuilder()
68
+ ..hideShareInviteButton(false)) // session_settings.dart:221
69
+ .build();
70
+
71
+ // The share-invite tap arrives on ButtonClickListeners
72
+ // (src/listener/button_click_listeners.dart:13), registered via
73
+ // CallSession.getInstance()?.addButtonClickListener(...) (call_session.dart:90):
68
74
  @override
69
75
  void onShareInviteButtonClicked() {
70
76
  Get.find<ShareInviteController>().share(sessionId);
@@ -3,13 +3,14 @@ name: cometchat-flutter-v5-conversations
3
3
  description: "Use when working with CometChat Flutter UIKit v5 conversation list component. Triggers on CometChatConversations, conversation list, recent chats."
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 conversations list recent chats"
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 — Conversations
14
15
 
15
16
  The `CometChatConversations` component displays a list of recent conversations.
@@ -3,7 +3,6 @@ name: cometchat-flutter-v5-core
3
3
  description: "Use when writing any code that uses CometChat Flutter UIKit v5 (cometchat_chat_uikit v5.2.14, cometchat_calls_uikit v5.0.15, cometchat_uikit_shared v5.2.3). Contains hard rules that prevent silent failures."
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; cometchat_sdk ^4.1.2; get ^4.6.5"
6
- allowed-tools: "shell, file-read, file-search, file-list"
7
6
  metadata:
8
7
  author: "CometChat"
9
8
  version: "3.0.0"
@@ -12,13 +11,15 @@ metadata:
12
11
 
13
12
  # CometChat Flutter UIKit v5 — Core Rules
14
13
 
14
+ > **Ground truth:** `cometchat_chat_uikit: ^5.2` (GetX-based; pair with `cometchat_calls_uikit: ^5.0` / raw `cometchat_calls_sdk ^5.0.2` for calls) — the pub-cache package source + `docs/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). V5 is legacy/maintenance-only (V6 is current); verify Dart symbols against the resolved package source.
15
+
15
16
  Non-negotiable constraints for all CometChat UIKit v5 code. Violating these causes silent failures or crashes.
16
17
 
17
18
  ## Key v5 Architecture Facts
18
19
 
19
20
  - State management: **GetX** (GetBuilder, GetxController, Get.put, Get.find, Get.delete)
20
21
  - Separate packages: `cometchat_chat_uikit` + `cometchat_calls_uikit` + `cometchat_uikit_shared`
21
- - SDK: `cometchat_sdk ^4.1.2` + `cometchat_calls_sdk ^4.2.2`
22
+ - SDK: `cometchat_sdk ^4.1.2` + `cometchat_calls_sdk ^4.2.2` (chat-kit baseline). **For voice/video calling, do NOT use `cometchat_calls_uikit` (4.x-bound) — integrate the raw `cometchat_calls_sdk ^5.0.2` per `cometchat-flutter-v5-calls`** (the V5-canonical calls path).
22
23
  - **Imports — two barrels.** For chat-only projects: `package:cometchat_chat_uikit/cometchat_chat_uikit.dart`. For projects that also need voice/video calling: ADD `package:cometchat_calls_uikit/cometchat_calls_uikit.dart` as a SECOND import — the calls barrel re-exports shared + SDK only and does NOT re-export `cometchat_chat_uikit`. Chat widgets like `CometChatConversations`, `CometChatMessageList`, `CometChatMessageComposer` are reachable only through the chat barrel.
23
24
  - `CometChatUIKit.login(uid)` takes a **String** directly (not an object)
24
25
  - No ServiceLocator pattern — controllers are created via `Get.put()` internally
@@ -219,3 +220,20 @@ void dispose() {
219
220
  - [ ] SDK listeners registered with unique ID, removed in `dispose()`
220
221
  - [ ] Colors from `CometChatThemeHelper`, never hardcoded
221
222
  - [ ] Imports: `package:cometchat_chat_uikit/cometchat_chat_uikit.dart` always; ADD `package:cometchat_calls_uikit/cometchat_calls_uikit.dart` if you use voice/video
223
+
224
+ ## Visual Builder integration
225
+
226
+ **Flutter V5 is the primary home for Visual Builder integration.** The canonical repo at the `chat_builder/` directory inside the Flutter Visual Builder ZIP (download from https://preview.cometchat.com/downloads/cometchat-builder-flutter.zip) ships **V5-shaped code** — `cometchat_chat_uikit: ^5.2.12` + `cometchat_calls_uikit: ^5.0.13`. The integration copies the entire `chat_builder/` directory as a `path:` dependency, then `BuilderSettingsHelper.loadFromAsset()` reads `chat_builder/assets/sample_app/cometchat-builder-settings.json` and configures the bundled chat UI accordingly.
227
+
228
+ **The full recipe lives in `cometchat-flutter-v6-core` §"Visual Builder integration"** because that's where the V6-prep restructure originally landed the validated content. Both skills reference the same canonical; the V6 page carries a "V5-shaped code" warning at the top. V5 customers should follow that recipe AS-IS — the canonical IS V5-targeted.
229
+
230
+ Validated 2026-05-21 against Flutter 3.38.3: `flutter build apk --debug` produces `app-debug.apk` after applying:
231
+ - Envelope-wrapped JSON at `chat_builder/assets/sample_app/cometchat-builder-settings.json`. The CLI (source of truth) writes `{ builderId, name, settings: {...} }`; the vendor canonical's own checked-in file carries only `{ builderId, settings }` (no `name`). `BuilderSettingsHelper.loadFromAsset()` reads only `builderId` + `settings` and ignores any extra top-level keys, so the CLI's extra `name` is harmless.
232
+ - Two missing-field defaults injected pre-write (mentionAll + inAppSounds — same as Android)
233
+ - `android.enableJetifier=true` in `android/gradle.properties` (the chat SDK pulls `com.android.support` transitively)
234
+ - `await BuilderSettingsHelper.loadFromAsset()` in `lib/main.dart` before `runApp()`
235
+ - `chat_builder: { path: ./chat_builder }` in host `pubspec.yaml`
236
+
237
+ Differences from the V6 page's recipe text:
238
+ - V5 host code uses `StatefulWidget` with direct listener management (V6 uses BLoC pattern); both work with the embedded chat_builder package since it owns its own state.
239
+ - V5 calls (the standalone `cometchat-flutter-v5-calls` flow, outside the builder) don't need the [[project_v6_flutter_calls_partial]] navigatorKey workaround — that's a V6-specific incoming-call-routing requirement. **However, the Visual Builder canonical itself (V5-shaped) wires `navigatorKey: CallNavigationContext.navigatorKey` UNCONDITIONALLY in every `MaterialApp` `ChatBuilder.createApp()` builds**, regardless of whether calls are enabled — so if you mount `ChatBuilder.createApp()` (recommended) or replicate its `MaterialApp` in a host wrapper, keep that navigator key in place. Do NOT gate it behind "calls enabled". See the v6-core recipe's wrapper guidance.
@@ -3,13 +3,14 @@ name: cometchat-flutter-v5-customization
3
3
  description: "Use when customizing CometChat Flutter UIKit v5 beyond props — custom bubbles, templates, DataSource decorators, slot views, formatters."
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 customization templates datasource decorator bubbles formatters"
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 — Customization
14
15
 
15
16
  Four tiers of customization, from simple to deep.
@@ -60,7 +61,7 @@ CometChatMessageHeader(
60
61
 
61
62
  Available slot views per component:
62
63
  - `CometChatConversations`: `subtitleView`, `listItemView`, `trailingView`, `leadingView`, `titleView`
63
- - `CometChatMessageHeader`: `subtitleView`, `listItemView`, `trailingView`
64
+ - `CometChatMessageHeader`: `subtitleView`, `listItemView`, `trailingView`, `titleView`
64
65
  - `CometChatMessageList`: `headerView`, `footerView`, `loadingStateView`, `emptyStateView`, `errorStateView`
65
66
  - `CometChatUsers`: `subtitleView`, `listItemView`, `leadingView`, `titleView`, `trailingView`
66
67
  - `CometChatGroups`: `subtitleView`, `listItemView`, `leadingView`, `titleView`, `trailingView`
@@ -138,12 +139,16 @@ final settings = (UIKitSettingsBuilder()
138
139
  | Polls | `PollsExtensionDecorator` | Poll creation + voting bubble |
139
140
  | Stickers | `StickersExtensionDecorator` | Sticker keyboard + bubble |
140
141
  | Link Preview | `LinkPreviewExtensionDecorator` | URL preview cards |
141
- | Message Translation | `MessageTranslationExtensionDecorator` | Translate option |
142
+ | Message Translation | `MessageExtensionTranslationDecorator` | Translate option |
142
143
  | Image Moderation | `ImageModerationExtensionDecorator` | NSFW filter |
143
144
  | Collaborative Document | `CollaborativeDocumentExtensionDecorator` | Shared doc |
144
- | Collaborative Whiteboard | `CollaborativeWhiteboardExtensionDecorator` | Shared whiteboard |
145
+ | Collaborative Whiteboard | `CollaborativeWhiteBoardExtensionDecorator` | Shared whiteboard |
145
146
  | Thumbnail Generation | `ThumbnailGenerationExtensionDecorator` | Image thumbnails |
146
147
 
148
+ > **Naming gotchas (kit-side inconsistencies)** — two decorator class names break the `[Feature]ExtensionDecorator` convention used by the other six. Use these exact spellings when subclassing or importing:
149
+ > - `CollaborativeWhiteBoardExtensionDecorator` — capital **B** in `WhiteBoard` (matches the kit's typo; lowercase `b` will not resolve).
150
+ > - `MessageExtensionTranslationDecorator` — token order is **inverted**; the public wrapper is `MessageTranslationExtension`, but the decorator itself uses `MessageExtensionTranslation`.
151
+
147
152
  ### CometChatCallingExtension
148
153
 
149
154
  The calling extension also uses this pattern:
@@ -164,7 +169,8 @@ class CometChatCallingExtension extends ExtensionsDataSource {
164
169
 
165
170
  ```dart
166
171
  CometChatMessageList(
167
- templates: [
172
+ // ✅ APPEND with addTemplate — keeps every default bubble (text/image/video/file/…)
173
+ addTemplate: [
168
174
  CometChatMessageTemplate(
169
175
  type: 'custom_type',
170
176
  category: 'custom',
@@ -178,6 +184,127 @@ CometChatMessageList(
178
184
  )
179
185
  ```
180
186
 
187
+ > **Use `addTemplate`, not `templates`, to add a type.** The `templates:` prop **replaces the entire set** — passing `templates: [myTemplate]` makes every default bubble (text, image, video, audio, file, …) stop rendering. `addTemplate:` layers your template on top of the defaults. Only reach for `templates:` when you deliberately want to redefine the whole list.
188
+
189
+ > `contentView` also accepts an optional named `{AdditionalConfigurations? additionalConfigurations}` arg if your custom bubble needs access to additional config passed down from the parent.
190
+
191
+ ### Custom attachment options — append via a DataSourceDecorator (super), don't replace
192
+
193
+ The composer's `attachmentOptions` builder returns the **whole** menu (a `ComposerActionsBuilder` — `(context, user, group, id)`), so returning `[myAction]` wipes photo/video/audio/file. The kit's own extensions add options by overriding `DataSource.getAttachmentOptions` and calling `super` first — do the same:
194
+
195
+ ```dart
196
+ class MyDataSource extends DataSourceDecorator {
197
+ MyDataSource(DataSource ds) : super(ds);
198
+
199
+ @override
200
+ List<CometChatMessageComposerAction> getAttachmentOptions(
201
+ BuildContext context, Map<String, dynamic>? id,
202
+ AdditionalConfigurations? additionalConfigurations,
203
+ ) {
204
+ final actions = super.getAttachmentOptions(context, id, additionalConfigurations); // defaults
205
+ actions.add(CometChatMessageComposerAction(
206
+ id: 'location', title: 'Send Location',
207
+ onItemClick: (ctx, user, group) { /* pick + send (below) */ },
208
+ ));
209
+ return actions; // appended — defaults preserved
210
+ }
211
+ }
212
+ ```
213
+
214
+ ### Sending a custom message — use the UIKit path, not the raw SDK
215
+
216
+ ```dart
217
+ final message = CustomMessage(
218
+ receiverUid: user.uid,
219
+ receiverType: ReceiverTypeConstants.user, // or .group
220
+ type: 'custom_type', // matches the template type
221
+ customData: {'lat': 19.07, 'lng': 72.87},
222
+ );
223
+ // ✅ kit path — sets muid + sender, emits ccMessageSent → list appends
224
+ await CometChatUIKit.sendCustomMessage(message);
225
+ // ❌ await CometChat.sendCustomMessage(message); // recipient error + realtime replace
226
+ ```
227
+
228
+ ### Override an existing type's bubble
229
+
230
+ To swap the content of a **built-in** type (e.g. text), **do NOT use `addTemplate:`** — a built-in collision passed via `addTemplate:` is silently dropped (the list controller backfills only *null* slots, and the default's `contentView`/`options` are already non-null; source: `chat_uikit/.../message_list/cometchat_message_list_controller.dart:571-613`). `addTemplate:` is for brand-NEW custom types only.
231
+
232
+ To override a built-in, **seed the full default set, modify the matching template in place, and pass the whole list via `templates:`** (the prop that defines the list's template set — passing the complete set guarantees no other built-in bubble is dropped). `contentView`'s full signature is `(BaseMessage, BuildContext, BubbleAlignment, {AdditionalConfigurations? additionalConfigurations})`.
233
+
234
+ ```dart
235
+ final templates = CometChatUIKit.getDataSource().getAllMessageTemplates();
236
+ for (final t in templates) {
237
+ if (t.type == MessageTypeConstants.text &&
238
+ t.category == MessageCategoryConstants.message) {
239
+ t.contentView = (message, context, alignment, {additionalConfigurations}) {
240
+ return Container(
241
+ padding: const EdgeInsets.all(8),
242
+ child: Text(message is TextMessage ? message.text : ''),
243
+ );
244
+ };
245
+ }
246
+ }
247
+
248
+ CometChatMessageList(user: user, templates: templates) // full set → no built-in dropped
249
+ ```
250
+
251
+ ### Message option — add a long-press action (Forward-style)
252
+
253
+ Two verified routes:
254
+
255
+ **A. Per-list, via the template's `options` callback.** The template's `options` signature is `(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group, AdditionalConfigurations? additionalConfigurations)` and returns `List<CometChatMessageOption>?`. Because this overrides a **built-in** type's `options`, use the same seed-the-full-set + `templates:` pattern as the bubble override above (NOT `addTemplate:`, which would be dropped). Seed each option list from the default `getMessageOptions` to **append** rather than replace:
256
+
257
+ ```dart
258
+ final templates = CometChatUIKit.getDataSource().getAllMessageTemplates();
259
+ for (final t in templates) {
260
+ if (t.type == MessageTypeConstants.text &&
261
+ t.category == MessageCategoryConstants.message) {
262
+ t.options = (loggedInUser, message, context, group, additionalConfigurations) {
263
+ final defaults = CometChatUIKit.getDataSource().getMessageOptions(
264
+ loggedInUser, message, context, group, additionalConfigurations);
265
+ defaults.add(CometChatMessageOption(
266
+ id: 'forward',
267
+ title: 'Forward',
268
+ icon: const Icon(Icons.forward, size: 24),
269
+ onItemClick: (BaseMessage msg, CometChatMessageListControllerProtocol state) {
270
+ // forward msg
271
+ },
272
+ ));
273
+ return defaults; // appended — default options preserved
274
+ };
275
+ }
276
+ }
277
+
278
+ CometChatMessageList(user: user, templates: templates)
279
+ ```
280
+
281
+ **B. App-wide, via a `DataSourceDecorator`.** Override `getMessageOptions` and call `super` first (same shape the kit's own extensions use):
282
+
283
+ ```dart
284
+ class MyDataSource extends DataSourceDecorator {
285
+ MyDataSource(DataSource ds) : super(ds);
286
+
287
+ @override
288
+ List<CometChatMessageOption> getMessageOptions(
289
+ User loggedInUser, BaseMessage messageObject, BuildContext context,
290
+ Group? group, AdditionalConfigurations? additionalConfigurations,
291
+ ) {
292
+ final options = super.getMessageOptions(
293
+ loggedInUser, messageObject, context, group, additionalConfigurations);
294
+ options.add(CometChatMessageOption(
295
+ id: 'forward', title: 'Forward',
296
+ onItemClick: (msg, state) { /* forward */ },
297
+ ));
298
+ return options; // appended — defaults preserved
299
+ }
300
+ }
301
+ // register: ChatConfigurator.enable((ds) => MyDataSource(ds));
302
+ ```
303
+
304
+ > `CometChatMessageOption.onItemClick` is `(BaseMessage message, CometChatMessageListControllerProtocol state)` — **not** the bare `Function()` used by `CometChatOption` (conversations/header). Don't mix the two models.
305
+
306
+ Verified (v5): `CometChatMessageList.addTemplate` + `.templates` (chat_uikit/.../message_list/cometchat_message_list.dart:108,55), `CometChatMessageTemplate({required type, required category, bubbleView, headerView, contentView, footerView, bottomView, statusInfoView, threadView, replyView, options})` (shared_uikit/.../models/cometchat_message_template.dart:21; `contentView` 3-arg + `{AdditionalConfigurations?}`, `options` 5 positional), `DataSourceDecorator.getAttachmentOptions(BuildContext, Map?, AdditionalConfigurations?)` + `.getMessageOptions(User, BaseMessage, BuildContext, Group?, AdditionalConfigurations?)` (shared_uikit/.../framework/data_source_decorator.dart:47,122 — both delegate to wrapped `dataSource`, so `super.x()` is correct), `ChatConfigurator.enable(DataSource Function(DataSource))` + `CometChatUIKit.getDataSource()` (shared_uikit/.../framework/chat_configurator.dart:14, cometchat_ui_kit.dart:713), `CometChatMessageOption(id:, title:, icon:, onItemClick:(BaseMessage,CometChatMessageListControllerProtocol), messageOptionSheetStyle:)` (shared_uikit/.../models/cometchat_message_option.dart:21), `CometChatMessageComposerAction(id:, title:, icon:, style:, onItemClick:(BuildContext,User?,Group?))` (shared_uikit/.../models/cometchat_message_composer_action.dart:23), `CometChatUIKit.sendCustomMessage(CustomMessage)`, `CustomMessage(receiverUid:, receiverType:, type:, customData:)`.
307
+
181
308
  ## Options Menu Customization
182
309
 
183
310
  Add or replace long-press options on conversations, users, groups:
@@ -225,3 +352,7 @@ CometChatMessageHeader(
225
352
  - [ ] Text formatters consistent between MessageList and Composer
226
353
  - [ ] Extensions registered via `UIKitSettingsBuilder.extensions`
227
354
  - [ ] Custom templates specify `type` and `category`
355
+
356
+ ## Sound (in-app message + call sounds)
357
+
358
+ The V5 UI Kit surfaces `CometChatSoundManager` for incoming/outgoing message + call sounds (mute / custom audio). **V5 is legacy/maintenance-only** — V6 is the current cohort. For call sounds see this family's `-calls` skill; verify the `CometChatSoundManager` API against the installed kit before relying on it.
@@ -3,13 +3,14 @@ name: cometchat-flutter-v5-events
3
3
  description: "Use when working with CometChat Flutter UIKit v5 event system. Triggers on CometChatMessageEvents, CometChatUserEvents, CometChatGroupEvents, CometChatCallEvents, CometChatUIEvents, listeners."
4
4
  license: "MIT"
5
5
  compatibility: "cometchat_uikit_shared ^5.2.3; cometchat_sdk ^4.1.2"
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 events listeners real-time typing receipts"
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 — Events
14
15
 
15
16
  Two layers: SDK listeners (low-level) and UIKit events (high-level component coordination).
@@ -3,13 +3,14 @@ name: cometchat-flutter-v5-messages
3
3
  description: "Use when working with CometChat Flutter UIKit v5 message components. Triggers on CometChatMessageList, CometChatMessageComposer, CometChatCompactMessageComposer, CometChatMessageHeader, threads."
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 messages list composer header bubbles threads compact"
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 — Messages
14
15
 
15
16
  Components for displaying, sending, and managing messages.
@@ -3,13 +3,14 @@ name: cometchat-flutter-v5-production
3
3
  description: "Use when preparing a CometChat Flutter UIKit v5 app for production. Covers auth tokens, ProGuard, environment config, security hardening."
4
4
  license: "MIT"
5
5
  compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_calls_uikit ^5.0.15"
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 production security auth tokens proguard environment"
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/fundamentals/user-auth · **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 — Production
14
15
 
15
16
  Hardening a CometChat Flutter app for production deployment.
@@ -67,12 +68,14 @@ android.useAndroidX=true
67
68
  android.enableJetifier=true
68
69
  ```
69
70
 
70
- ### minSdk 26
71
+ ### minSdk
71
72
 
72
73
  ```groovy
73
74
  // android/app/build.gradle
74
75
  defaultConfig {
75
- minSdk 26 // Required by cometchat_calls_sdk
76
+ minSdk 24 // Matches vendor samples (sample_app + sample_app_push_notifications + calls_uikit android/build.gradle).
77
+ // Raw calls-sdk docs cite 26; the UI Kit wrapper relaxes to 24 for chat-only apps.
78
+ // Bump to 26 ONLY if your app uses calls AND fails at runtime with a min-SDK error from the calls plugin.
76
79
  }
77
80
  ```
78
81
 
@@ -180,8 +183,14 @@ CometChat.setDemoMetaInfo(jsonObject: {
180
183
  ## Logout Flow
181
184
 
182
185
  ```dart
183
- // 1. Unregister push tokens
184
- PNRegistry.unregisterPNService();
186
+ // 1. Unregister push tokens — real SDK API:
187
+ await CometChatNotifications.unregisterPushToken(
188
+ onSuccess: (_) {},
189
+ onError: (e) {},
190
+ );
191
+ // (PNRegistry.unregisterPNService() only works if you copied the v5 sample-app
192
+ // `extension PNRegistry on CometChatService` helper into your project — it is
193
+ // NOT importable from any cometchat_* package. See cometchat-flutter-v5-push.)
185
194
 
186
195
  // 2. Sign out from Firebase/Google (if applicable)
187
196
  await FirebaseAuth.instance.signOut();
@@ -199,7 +208,7 @@ await CometChatUIKit.logout(
199
208
  - [ ] Auth tokens minted server-side, not authKey in client
200
209
  - [ ] Credentials not hardcoded in source (use SharedPreferences or remote config)
201
210
  - [ ] ProGuard rules added for release builds
202
- - [ ] minSdk 26 set
211
+ - [ ] minSdk 24 set (or 26 if your app uses calls AND hits min-SDK runtime errors)
203
212
  - [ ] iOS permissions in Info.plist
204
213
  - [ ] Firebase Crashlytics configured
205
214
  - [ ] Push notification provider IDs match CometChat dashboard
@@ -3,13 +3,14 @@ name: cometchat-flutter-v5-push
3
3
  description: "Use when implementing push notifications with CometChat Flutter UIKit v5. Covers FCM (Android), APNs (iOS), VoIP calls, token lifecycle, local notifications, and tap-to-navigate."
4
4
  license: "MIT"
5
5
  compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_calls_uikit ^5.0.15; firebase_messaging; flutter_local_notifications; flutter_callkit_incoming"
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 push notifications fcm apns voip callkit firebase"
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/notifications/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 — Push Notifications
14
15
 
15
16
  Push notification setup for Android (FCM) and iOS (APNs + VoIP).