@cometchat/skills 4.3.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/bin/install.js +27 -0
- package/package.json +14 -1
- package/skills/cometchat/SKILL.md +233 -69
- package/skills/cometchat/references/asking-questions.md +48 -0
- package/skills/cometchat-a11y/SKILL.md +3 -2
- package/skills/cometchat-android-v5/SKILL.md +2 -1
- package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
- package/skills/cometchat-android-v5-calls/references/README.md +1 -1
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
- package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
- package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
- package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
- package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
- package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
- package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
- package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
- package/skills/cometchat-android-v5-components/SKILL.md +4 -3
- package/skills/cometchat-android-v5-core/SKILL.md +5 -3
- package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
- package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
- package/skills/cometchat-android-v5-features/SKILL.md +5 -4
- package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
- package/skills/cometchat-android-v5-production/SKILL.md +2 -1
- package/skills/cometchat-android-v5-push/SKILL.md +2 -3
- package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
- package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
- package/skills/cometchat-android-v6/SKILL.md +2 -1
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
- package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
- package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
- package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
- package/skills/cometchat-android-v6-core/SKILL.md +208 -28
- package/skills/cometchat-android-v6-events/SKILL.md +4 -1
- package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
- package/skills/cometchat-android-v6-features/SKILL.md +26 -2
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
- package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
- package/skills/cometchat-android-v6-production/SKILL.md +6 -3
- package/skills/cometchat-android-v6-push/SKILL.md +43 -2
- package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
- package/skills/cometchat-angular-calls/SKILL.md +256 -389
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
- package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
- package/skills/cometchat-angular-calls/references/call-session.md +2 -2
- package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
- package/skills/cometchat-angular-calls/references/device-management.md +53 -34
- package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
- package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
- package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
- package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
- package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
- package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
- package/skills/cometchat-angular-components/SKILL.md +149 -620
- package/skills/cometchat-angular-core/SKILL.md +232 -312
- package/skills/cometchat-angular-customization/SKILL.md +415 -223
- package/skills/cometchat-angular-features/SKILL.md +216 -334
- package/skills/cometchat-angular-patterns/SKILL.md +168 -359
- package/skills/cometchat-angular-placement/SKILL.md +189 -560
- package/skills/cometchat-angular-production/SKILL.md +241 -92
- package/skills/cometchat-angular-push/SKILL.md +280 -294
- package/skills/cometchat-angular-testing/SKILL.md +430 -158
- package/skills/cometchat-angular-theming/SKILL.md +190 -265
- package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
- package/skills/cometchat-astro-patterns/SKILL.md +3 -2
- package/skills/cometchat-calls/SKILL.md +25 -19
- package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
- package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
- package/skills/cometchat-calls/references/use-case-support.md +3 -4
- package/skills/cometchat-calls/references/use-case-team.md +23 -12
- package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
- package/skills/cometchat-components/SKILL.md +163 -25
- package/skills/cometchat-core/SKILL.md +258 -20
- package/skills/cometchat-customization/SKILL.md +50 -25
- package/skills/cometchat-features/SKILL.md +314 -35
- package/skills/cometchat-flutter-v5/SKILL.md +10 -4
- package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
- package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
- package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
- package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
- package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6/SKILL.md +17 -16
- package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
- package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
- package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
- package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
- package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
- package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
- package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
- package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
- package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
- package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
- package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
- package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
- package/skills/cometchat-i18n/SKILL.md +140 -79
- package/skills/cometchat-ios/SKILL.md +4 -2
- package/skills/cometchat-ios-calls/SKILL.md +225 -95
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
- package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
- package/skills/cometchat-ios-calls/references/call-session.md +51 -54
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
- package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
- package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
- package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
- package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
- package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
- package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
- package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
- package/skills/cometchat-ios-components/SKILL.md +200 -12
- package/skills/cometchat-ios-core/SKILL.md +173 -45
- package/skills/cometchat-ios-customization/SKILL.md +276 -110
- package/skills/cometchat-ios-features/SKILL.md +64 -36
- package/skills/cometchat-ios-placement/SKILL.md +15 -12
- package/skills/cometchat-ios-production/SKILL.md +12 -4
- package/skills/cometchat-ios-push/SKILL.md +53 -19
- package/skills/cometchat-ios-testing/SKILL.md +14 -9
- package/skills/cometchat-ios-theming/SKILL.md +39 -3
- package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
- package/skills/cometchat-native-bare-patterns/SKILL.md +36 -19
- package/skills/cometchat-native-calls/SKILL.md +29 -17
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
- package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
- package/skills/cometchat-native-calls/references/call-session.md +2 -2
- package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
- package/skills/cometchat-native-calls/references/device-management.md +53 -30
- package/skills/cometchat-native-calls/references/group-calls.md +35 -30
- package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
- package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
- package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
- package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
- package/skills/cometchat-native-calls/references/share-invite.md +7 -5
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
- package/skills/cometchat-native-components/SKILL.md +84 -52
- package/skills/cometchat-native-core/SKILL.md +102 -33
- package/skills/cometchat-native-customization/SKILL.md +150 -28
- package/skills/cometchat-native-expo-patterns/SKILL.md +60 -29
- package/skills/cometchat-native-features/SKILL.md +24 -17
- package/skills/cometchat-native-placement/SKILL.md +19 -10
- package/skills/cometchat-native-production/SKILL.md +9 -3
- package/skills/cometchat-native-push/SKILL.md +2 -1
- package/skills/cometchat-native-testing/SKILL.md +1 -2
- package/skills/cometchat-native-theming/SKILL.md +54 -29
- package/skills/cometchat-native-troubleshooting/SKILL.md +11 -5
- package/skills/cometchat-nextjs-patterns/SKILL.md +22 -8
- package/skills/cometchat-placement/SKILL.md +42 -3
- package/skills/cometchat-production/SKILL.md +12 -5
- package/skills/cometchat-react-calls/SKILL.md +220 -10
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
- package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
- package/skills/cometchat-react-calls/references/call-session.md +1 -1
- package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
- package/skills/cometchat-react-calls/references/device-management.md +55 -51
- package/skills/cometchat-react-calls/references/group-calls.md +18 -23
- package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
- package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
- package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
- package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
- package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
- package/skills/cometchat-react-calls/references/share-invite.md +4 -5
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
- package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
- package/skills/cometchat-react-patterns/SKILL.md +45 -5
- package/skills/cometchat-react-push/SKILL.md +258 -72
- package/skills/cometchat-react-router-patterns/SKILL.md +12 -6
- package/skills/cometchat-react-testing/SKILL.md +14 -5
- package/skills/cometchat-theming/SKILL.md +181 -18
- package/skills/cometchat-troubleshooting/SKILL.md +40 -20
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Flutter V6 — advanced in-call features (Recording, Virtual Background, Audio Modes, PiP, Screen-share)
|
|
2
|
+
|
|
3
|
+
V6 folds calls into `cometchat_chat_uikit:^6.0` (depends transitively on `cometchat_calls_sdk >=5.0.2`). Every symbol below is verified against `cometchat_calls_sdk-5.0.2`'s `CallSession`. All controls hang off the active session singleton:
|
|
4
|
+
|
|
5
|
+
```dart
|
|
6
|
+
final session = CallSession.getInstance(); // active call session (after onSuccess)
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
State changes arrive on `MediaEventListeners` / `ParticipantEventListeners` (register the same way this skill already registers `SessionStatusListeners` — via the session after the join succeeds, and remove them in `dispose`).
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Recording
|
|
14
|
+
|
|
15
|
+
Server-gated — enable recording for the app in the CometChat dashboard first.
|
|
16
|
+
|
|
17
|
+
```dart
|
|
18
|
+
await CallSession.getInstance().startRecording();
|
|
19
|
+
await CallSession.getInstance().stopRecording();
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
React to state via `MediaEventListeners.onRecordingStarted()` / `onRecordingStopped()`.
|
|
23
|
+
|
|
24
|
+
Verified: `CallSession.startRecording()` / `stopRecording()`, `MediaEventListeners.onRecordingStarted()`.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. Virtual Background
|
|
29
|
+
|
|
30
|
+
Flutter DOES support virtual background (unlike native iOS/Android). The SDK opens the kit's built-in settings panel (blur / image / clear); you don't build the picker:
|
|
31
|
+
|
|
32
|
+
```dart
|
|
33
|
+
await CallSession.getInstance().openVirtualBackgroundSettingsPanel();
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Verified: `CallSession.openVirtualBackgroundSettingsPanel()`.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 3. Audio modes
|
|
41
|
+
|
|
42
|
+
```dart
|
|
43
|
+
await CallSession.getInstance().setAudioModeType(AudioMode.speaker);
|
|
44
|
+
// AudioMode.speaker | AudioMode.earpiece | AudioMode.bluetooth (no .headphones on Flutter)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
React via `MediaEventListeners.onAudioModeChanged(...)`.
|
|
48
|
+
|
|
49
|
+
Verified: `CallSession.setAudioModeType(AudioMode)`; `enum AudioMode { speaker, earpiece, bluetooth }`.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 4. Picture-in-Picture
|
|
54
|
+
|
|
55
|
+
- **In-call compact layout:** `enablePictureInPictureLayout()` / `disablePictureInPictureLayout()`.
|
|
56
|
+
- **System PiP** (OS floats the call when the user leaves the app): gate it on `isPipSupported()` then `enterPipMode()`.
|
|
57
|
+
|
|
58
|
+
```dart
|
|
59
|
+
final session = CallSession.getInstance();
|
|
60
|
+
await session.enablePictureInPictureLayout();
|
|
61
|
+
// system PiP
|
|
62
|
+
if (await session.isPipSupported()) {
|
|
63
|
+
await session.enterPipMode();
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Verified: `CallSession.enablePictureInPictureLayout()` / `disablePictureInPictureLayout()` / `enterPipMode()` / `isPipSupported()`.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 5. Screen sharing — receive only
|
|
72
|
+
|
|
73
|
+
Flutter (like iOS/Android) cannot locally INITIATE screen share — it renders a remote participant's shared screen inside the call grid automatically. Wire a listener only to react:
|
|
74
|
+
|
|
75
|
+
```dart
|
|
76
|
+
// ParticipantEventListeners
|
|
77
|
+
@override
|
|
78
|
+
void onParticipantStartedScreenShare(Participant participant) { /* e.g. switch layout */ }
|
|
79
|
+
@override
|
|
80
|
+
void onParticipantStoppedScreenShare(Participant participant) { }
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Verified: `ParticipantEventListeners.onParticipantStartedScreenShare(Participant)` / `onParticipantStoppedScreenShare(Participant)`. No local-initiation symbol exists — do not author one.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Camera (cross-reference)
|
|
88
|
+
|
|
89
|
+
Front/back switch + on/off is in `references/device-management.md` (`CallSession.switchCamera()`). Custom Control Panel: the V6 kit owns the in-call control surface; per-button hiding is via the session/call settings, not a separate panel API.
|
|
@@ -11,26 +11,29 @@ Same SDK shape; Bloc-driven layout state.
|
|
|
11
11
|
|
|
12
12
|
A layout switcher is a great fit for a Cubit since it has only one piece of state with simple updates.
|
|
13
13
|
|
|
14
|
+
`setLayout` is an **instance method on the `CallSession` singleton** (`cometchat_calls_sdk-5.0.2` `src/call_session.dart:394`), and the layout enum is `LayoutType { tile, sidebar, spotlight }` (`src/enums/layout_type.dart`) — there is no `CallLayout` type and no static `CometChatCalls.setLayout`.
|
|
15
|
+
|
|
14
16
|
```dart
|
|
15
|
-
class CallLayoutCubit extends Cubit<
|
|
16
|
-
CallLayoutCubit() : super(
|
|
17
|
+
class CallLayoutCubit extends Cubit<LayoutType> {
|
|
18
|
+
CallLayoutCubit() : super(LayoutType.tile);
|
|
17
19
|
|
|
18
|
-
void set(
|
|
19
|
-
|
|
20
|
+
void set(LayoutType next) {
|
|
21
|
+
CallSession.getInstance()?.setLayout(next);
|
|
20
22
|
emit(next);
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
void onSDKChanged(
|
|
25
|
+
void onSDKChanged(LayoutType next) {
|
|
24
26
|
emit(next); // already changed by kit's switcher; just sync
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
```
|
|
28
30
|
|
|
29
|
-
Hook the SDK event:
|
|
31
|
+
Hook the SDK event — `onCallLayoutChanged` is on `LayoutListeners`, attached via the `layoutListener` setter (`src/call_session.dart:98`):
|
|
30
32
|
|
|
31
33
|
```dart
|
|
34
|
+
// e.g. CallSession.getInstance()?.layoutListener = myLayoutListener;
|
|
32
35
|
@override
|
|
33
|
-
void onCallLayoutChanged(
|
|
36
|
+
void onCallLayoutChanged(LayoutType layout) {
|
|
34
37
|
context.read<CallLayoutCubit>().onSDKChanged(layout);
|
|
35
38
|
}
|
|
36
39
|
```
|
|
@@ -45,12 +48,12 @@ class LayoutSwitcher extends StatelessWidget {
|
|
|
45
48
|
|
|
46
49
|
@override
|
|
47
50
|
Widget build(BuildContext context) {
|
|
48
|
-
return BlocBuilder<CallLayoutCubit,
|
|
49
|
-
builder: (context, layout) => SegmentedButton<
|
|
51
|
+
return BlocBuilder<CallLayoutCubit, LayoutType>(
|
|
52
|
+
builder: (context, layout) => SegmentedButton<LayoutType>(
|
|
50
53
|
segments: const [
|
|
51
|
-
ButtonSegment(value:
|
|
52
|
-
ButtonSegment(value:
|
|
53
|
-
ButtonSegment(value:
|
|
54
|
+
ButtonSegment(value: LayoutType.tile, label: Text('Tile')),
|
|
55
|
+
ButtonSegment(value: LayoutType.sidebar, label: Text('Sidebar')),
|
|
56
|
+
ButtonSegment(value: LayoutType.spotlight, label: Text('Spotlight')),
|
|
54
57
|
],
|
|
55
58
|
selected: {layout},
|
|
56
59
|
onSelectionChanged: (set) {
|
|
@@ -6,7 +6,7 @@ Bloc-driven adaptation of the upstream sample. Same SDK underneath as V5 (`comet
|
|
|
6
6
|
- `cometchat-flutter-v5-calls/references/call-session.md` — V5 sister, canonical SDK API surface (callback shape, `SessionSettingsBuilder`, `SessionStatusListeners`)
|
|
7
7
|
- `cometchat-react-calls/references/call-session.md` — full cross-platform architecture
|
|
8
8
|
|
|
9
|
-
**Source of truth:**
|
|
9
|
+
**Source of truth:** `calls-sdk-flutter-5/sample-apps/cometchat-calls-sample-app-flutter/lib/screens/call_screen.dart` (the SDK version is the same; only the state-management primitive differs between v5 GetX and v6 Bloc).
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -225,5 +225,5 @@ V5 sister rules apply, plus V6-specific:
|
|
|
225
225
|
- `cometchat-flutter-v5-calls/references/call-session.md` — V5 sister + canonical SDK API
|
|
226
226
|
- `cometchat-flutter-v6-calls/SKILL.md` — V6 Bloc patterns
|
|
227
227
|
- `cometchat-flutter-v6-calls/references/share-invite.md` — deep-link config
|
|
228
|
-
- Upstream sample —
|
|
228
|
+
- Upstream sample — `calls-sdk-flutter-5/sample-apps/cometchat-calls-sample-app-flutter/lib/screens/call_screen.dart` (SDK is the same)
|
|
229
229
|
- Canonical docs: https://www.cometchat.com/docs/calls/flutter/join-session
|
|
@@ -9,7 +9,10 @@ Same SDK API as V5; Bloc-based state.
|
|
|
9
9
|
|
|
10
10
|
## SDK API
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
These are **instance methods on the `CallSession` singleton**, not static on `CometChatCalls` (verified `cometchat_calls_sdk-5.0.2`):
|
|
13
|
+
|
|
14
|
+
- `CallSession.getInstance()?.switchCamera()` — front/back flip (`src/call_session.dart:205`).
|
|
15
|
+
- Audio output is **not** a `setSpeakerEnabled(bool)` toggle (no such method exists). Use `CallSession.getInstance()?.setAudioModeType(AudioMode)` (`src/call_session.dart:381`), where `AudioMode` is the enum `{ speaker, earpiece, bluetooth }` (`src/enums/audio_mode.dart`).
|
|
13
16
|
|
|
14
17
|
---
|
|
15
18
|
|
|
@@ -36,11 +39,14 @@ class DeviceBloc extends Bloc<DeviceEvent, DeviceState> {
|
|
|
36
39
|
DeviceBloc() : super(const DeviceState()) {
|
|
37
40
|
on<ToggleSpeaker>((event, emit) {
|
|
38
41
|
final next = !state.speakerOn;
|
|
39
|
-
|
|
42
|
+
// No setSpeakerEnabled(bool); route audio via the AudioMode enum.
|
|
43
|
+
CallSession.getInstance()?.setAudioModeType(
|
|
44
|
+
next ? AudioMode.speaker : AudioMode.earpiece,
|
|
45
|
+
);
|
|
40
46
|
emit(state.copyWith(speakerOn: next));
|
|
41
47
|
});
|
|
42
48
|
on<FlipCamera>((event, emit) {
|
|
43
|
-
|
|
49
|
+
CallSession.getInstance()?.switchCamera();
|
|
44
50
|
emit(state.copyWith(cameraIsBack: !state.cameraIsBack));
|
|
45
51
|
});
|
|
46
52
|
}
|
|
@@ -6,7 +6,7 @@ By-design kit behavior — same semantic across all CometChat kits.
|
|
|
6
6
|
|
|
7
7
|
**Canonical docs:** https://www.cometchat.com/docs/calls/flutter/group-calls
|
|
8
8
|
|
|
9
|
-
V6 specifics: Flutter V6 folds calls into `cometchat_chat_uikit ^6.0.
|
|
9
|
+
V6 specifics: Flutter V6 folds calls into `cometchat_chat_uikit ^6.0.1` (no separate calls package). Bloc-based state. The outgoing→in-call transition bug that existed in `6.0.0-beta2` is **FIXED in 6.0.1 GA** (see SKILL.md §1.7) — the kit-driven path now works for groups too, **provided `navigatorKey: CallNavigationContext.navigatorKey` is wired on your MaterialApp**. The custom-UI path below remains a valid alternative (and is required if you render your own call surface).
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -39,7 +39,7 @@ Caller (uidA, member of groupX) CometChat Receivers (membe
|
|
|
39
39
|
|
|
40
40
|
1. **Group calls broadcast a custom message; they do NOT use the call listener.** Custom UI must add a `MessageListener`.
|
|
41
41
|
2. **Session ID = group GUID.** Persistent.
|
|
42
|
-
3.
|
|
42
|
+
3. **`navigatorKey` is mandatory for the kit's group call screen** (SKILL.md §1.7). With it wired, the kit's outgoing→ongoing transition works on 6.0.1 (the beta2 bug is fixed). Without it, the outgoing-call screen never renders — this is the one remaining requirement, not a reason to avoid the kit path.
|
|
43
43
|
4. **`navigatorKey: CallNavigationContext.navigatorKey` required on MaterialApp** if using ANY kit-driven call UI path (group or 1:1) — same as the SKILL rule.
|
|
44
44
|
5. **No `CometChat.endCall` for groups.** Use `CometChatUIKitCalls.endSession()` only.
|
|
45
45
|
|
|
@@ -57,9 +57,9 @@ CometChatCallButtons(
|
|
|
57
57
|
|
|
58
58
|
Tap → kit sends meeting `CustomMessage` + opens outgoing-call screen.
|
|
59
59
|
|
|
60
|
-
>
|
|
60
|
+
> **✅ On 6.0.1 the outgoing→in-call transition works** once `navigatorKey: CallNavigationContext.navigatorKey` is wired on MaterialApp (SKILL §1.7). Without that wiring the caller sees "Calling..." indefinitely — so wire it. The custom-UI path below is an alternative for apps that render their own call surface.
|
|
61
61
|
|
|
62
|
-
## Caller side — custom UI (
|
|
62
|
+
## Caller side — custom UI (alternative to the kit path)
|
|
63
63
|
|
|
64
64
|
```dart
|
|
65
65
|
import 'package:flutter_chat_sdk/flutter_chat_sdk.dart';
|
|
@@ -95,7 +95,7 @@ Future<void> startGroupCall(BuildContext context, String groupGuid, String callT
|
|
|
95
95
|
}
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
Then in your custom `/ongoing-call` screen,
|
|
98
|
+
Then in your custom `/ongoing-call` screen, join the session against your own RTC view — same primitives the kit uses internally, but you control the navigation. On the raw Calls SDK the current API is the **named-parameter** `CometChatCalls.joinSession(callToken:` (or `sessionId:`)`, sessionSettings:, onSuccess:, onError:)` (`cometchat_calls_sdk-5.0.2` `src/plugin/cometchatcalls.dart:735`). The old positional `CometChatCalls.startSession(...)` is `@Deprecated` — do not use it. (If you stay on the kit wrapper `CometChatUIKitCalls`, use its kit-side join API — that is kit-side, not the raw SDK.)
|
|
99
99
|
|
|
100
100
|
---
|
|
101
101
|
|
|
@@ -103,9 +103,9 @@ Then in your custom `/ongoing-call` screen, call `CometChatUIKitCalls.startSessi
|
|
|
103
103
|
|
|
104
104
|
`CometChatMessageList(group: group)` (or whichever message-list widget V6 ships) auto-renders the meeting message as a "Join meeting" card. Tap → kit calls `generateToken` + pushes the ongoing-call screen.
|
|
105
105
|
|
|
106
|
-
> Same
|
|
106
|
+
> Same `navigatorKey` requirement applies on the receiver side for the kit-driven join flow on 6.0.1. With it wired, the join→ongoing transition works; the custom join flow below is the alternative.
|
|
107
107
|
|
|
108
|
-
## Receiver side — custom UI (
|
|
108
|
+
## Receiver side — custom UI (alternative)
|
|
109
109
|
|
|
110
110
|
```dart
|
|
111
111
|
import 'package:flutter_chat_sdk/flutter_chat_sdk.dart';
|
|
@@ -145,9 +145,9 @@ Register AFTER `CometChatUIKit.login` succeeds (e.g. in the auth Bloc's `_onLogi
|
|
|
145
145
|
|
|
146
146
|
## Edge cases
|
|
147
147
|
|
|
148
|
-
### V6
|
|
148
|
+
### V6 calls status (resolved)
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
The beta2 outgoing-call → in-call transition bug is **FIXED in 6.0.1 GA** (validated 2026-05-27 on Pixel 3 — see SKILL.md §1.7). Production Flutter customers can use V6 for both 1:1 and group calls; the only requirement is the `navigatorKey: CallNavigationContext.navigatorKey` MaterialApp wiring.
|
|
151
151
|
|
|
152
152
|
### Late joining
|
|
153
153
|
|
|
@@ -162,7 +162,7 @@ Meeting `CustomMessage.metadata.pushNotification = "meeting"` — delivered as r
|
|
|
162
162
|
## Anti-patterns
|
|
163
163
|
|
|
164
164
|
1. **Only `CometChat.addCallListener` registered.** Won't fire for groups.
|
|
165
|
-
2. **
|
|
165
|
+
2. **Using the kit's group call screen WITHOUT wiring `navigatorKey`.** The screen never renders. Wire `CallNavigationContext.navigatorKey` (the beta2 transition bug itself is fixed in 6.0.1).
|
|
166
166
|
3. **`CometChat.endCall(sessionId)` after group hangup.** No call entity.
|
|
167
167
|
4. **`MessageListener` registered before login.** Silently dropped.
|
|
168
168
|
5. **Skipping `navigatorKey` setup** for any kit-driven call path.
|
|
@@ -8,16 +8,21 @@ Same SDK API as V5; Bloc-based wiring. Read `cometchat-flutter-v5-calls/referenc
|
|
|
8
8
|
|
|
9
9
|
## SDK API + listener bridge
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Set the idle period on `SessionSettingsBuilder().setIdleTimeoutPeriod(int)` (seconds — `cometchat_calls_sdk-5.0.2` `src/builder/session_settings.dart:185`). The monolithic `CometChatCallsEventsListener` is `@Deprecated` in 5.0.2 (`src/listener/cometchat_calls_events_listener.dart:16`) — use the v5 split listeners instead. `onSessionTimedOut()` lives on `SessionStatusListeners` (`src/listener/session_status_listeners.dart`), registered via `CallSession.getInstance()?.addSessionStatusListener(...)` (`src/call_session.dart:66`). There is no `CometChatCalls.addCallEventListener`.
|
|
12
|
+
|
|
13
|
+
Listener via Bloc bridge (cf. `cometchat-flutter-v6-calls/references/raise-hand.md`):
|
|
12
14
|
|
|
13
15
|
```dart
|
|
16
|
+
// Apply the idle timeout when building session settings:
|
|
17
|
+
final settings = SessionSettingsBuilder().setIdleTimeoutPeriod(180).build();
|
|
18
|
+
|
|
14
19
|
abstract class CallEvent {}
|
|
15
20
|
class _SessionTimedOut extends CallEvent {}
|
|
16
21
|
|
|
17
|
-
class CallBloc extends Bloc<CallEvent, CallState> implements
|
|
22
|
+
class CallBloc extends Bloc<CallEvent, CallState> implements SessionStatusListeners {
|
|
18
23
|
CallBloc() : super(const CallState()) {
|
|
19
24
|
on<_SessionTimedOut>(_onTimedOut);
|
|
20
|
-
|
|
25
|
+
CallSession.getInstance()?.addSessionStatusListener(this);
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
@override
|
|
@@ -29,9 +34,11 @@ class CallBloc extends Bloc<CallEvent, CallState> implements CometChatCallsEvent
|
|
|
29
34
|
emit(state.copyWith(timedOut: true));
|
|
30
35
|
}
|
|
31
36
|
|
|
37
|
+
// ... other SessionStatusListeners callbacks (onSessionJoined/onSessionLeft/...) as no-ops
|
|
38
|
+
|
|
32
39
|
@override
|
|
33
40
|
Future<void> close() {
|
|
34
|
-
|
|
41
|
+
CallSession.getInstance()?.removeSessionStatusListener(this);
|
|
35
42
|
return super.close();
|
|
36
43
|
}
|
|
37
44
|
}
|
|
@@ -64,10 +71,11 @@ Identical code; cite V5 sister reference.
|
|
|
64
71
|
|
|
65
72
|
## Verification checklist
|
|
66
73
|
|
|
67
|
-
- [ ]
|
|
68
|
-
- [ ] CallBloc bridges `onSessionTimedOut` to `_SessionTimedOut`
|
|
74
|
+
- [ ] `SessionSettingsBuilder().setIdleTimeoutPeriod(seconds)` sets the idle period
|
|
75
|
+
- [ ] CallBloc implements `SessionStatusListeners` and bridges `onSessionTimedOut` to `_SessionTimedOut`
|
|
76
|
+
- [ ] Listener registered via `CallSession.getInstance()?.addSessionStatusListener(this)`
|
|
69
77
|
- [ ] BlocListener with `listenWhen` triggers nav + snackbar
|
|
70
|
-
- [ ] Bloc `close()` removes the listener
|
|
78
|
+
- [ ] Bloc `close()` removes the listener via `removeSessionStatusListener(this)`
|
|
71
79
|
- [ ] Real-device smoke: same as V5
|
|
72
80
|
|
|
73
81
|
---
|
|
@@ -41,7 +41,9 @@ class InCallChatBloc extends Bloc<InCallChatEvent, InCallChatState> {
|
|
|
41
41
|
|
|
42
42
|
void _onOpen(OpenChat event, Emitter<InCallChatState> emit) {
|
|
43
43
|
emit(state.copyWith(open: true, unread: 0));
|
|
44
|
-
|
|
44
|
+
// setChatButtonUnreadCount is an instance method on CallSession
|
|
45
|
+
// (cometchat_calls_sdk-5.0.2 src/call_session.dart:489), not static.
|
|
46
|
+
CallSession.getInstance()?.setChatButtonUnreadCount(0);
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
void _onClose(OpenChat event, Emitter<InCallChatState> emit) {
|
|
@@ -52,7 +54,7 @@ class InCallChatBloc extends Bloc<InCallChatEvent, InCallChatState> {
|
|
|
52
54
|
if (state.open) return;
|
|
53
55
|
final next = state.unread + 1;
|
|
54
56
|
emit(state.copyWith(unread: next));
|
|
55
|
-
|
|
57
|
+
CallSession.getInstance()?.setChatButtonUnreadCount(next);
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
```
|
|
@@ -61,9 +63,10 @@ class InCallChatBloc extends Bloc<InCallChatEvent, InCallChatState> {
|
|
|
61
63
|
|
|
62
64
|
## Triggering open from SDK event
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
`onChatButtonClicked()` is on `ButtonClickListeners` (v5 split listener), registered via `CallSession.getInstance()?.addButtonClickListener(...)` — NOT the deprecated `CometChatCallsEventsListener`:
|
|
65
67
|
|
|
66
68
|
```dart
|
|
69
|
+
// class ... implements ButtonClickListeners
|
|
67
70
|
@override
|
|
68
71
|
void onChatButtonClicked() {
|
|
69
72
|
context.read<InCallChatBloc>().add(OpenChat());
|
|
@@ -9,20 +9,27 @@ Same SDK conceptual API as V5; the difference is state management — V6 uses `f
|
|
|
9
9
|
|
|
10
10
|
## SDK API (same as V5)
|
|
11
11
|
|
|
12
|
+
Raise/lower hand are **instance methods on the `CallSession` singleton**, NOT static on `CometChatCalls` (verified `cometchat_calls_sdk-5.0.2` `src/call_session.dart:292,306`; the static `CometChatCalls` class has no `raiseHand`/`lowerHand`). Participant hand events arrive via `ParticipantEventListeners`, registered through `CallSession.getInstance()?.addParticipantEventListener(...)` (`src/call_session.dart:78`) — there is no `CometChatCalls.addCallEventListener`.
|
|
13
|
+
|
|
12
14
|
```dart
|
|
13
15
|
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
|
|
14
16
|
import 'package:cometchat_chat_uikit/cometchat_calls_uikit.dart';
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
CallSession.getInstance()?.raiseHand();
|
|
19
|
+
CallSession.getInstance()?.lowerHand();
|
|
20
|
+
|
|
21
|
+
// Register a ParticipantEventListeners implementation:
|
|
22
|
+
CallSession.getInstance()?.addParticipantEventListener(myListener);
|
|
18
23
|
|
|
19
|
-
// In
|
|
24
|
+
// In your ParticipantEventListeners implementation:
|
|
20
25
|
@override
|
|
21
26
|
void onParticipantHandRaised(Participant p) { /* ... */ }
|
|
22
27
|
@override
|
|
23
28
|
void onParticipantHandLowered(Participant p) { /* ... */ }
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
// hideRaiseHandButton is a METHOD on the (non-deprecated) SessionSettingsBuilder.
|
|
31
|
+
// `CallSettingsBuilder` is @Deprecated in 5.0.2 (src/builder/call_settings.dart:208).
|
|
32
|
+
final settings = SessionSettingsBuilder().hideRaiseHandButton(true).build();
|
|
26
33
|
```
|
|
27
34
|
|
|
28
35
|
---
|
|
@@ -78,22 +85,22 @@ class _ParticipantLowered extends RaiseHandEvent {
|
|
|
78
85
|
|
|
79
86
|
```dart
|
|
80
87
|
class RaiseHandBloc extends Bloc<RaiseHandEvent, RaiseHandState>
|
|
81
|
-
implements
|
|
88
|
+
implements ParticipantEventListeners {
|
|
82
89
|
|
|
83
90
|
RaiseHandBloc() : super(const RaiseHandState()) {
|
|
84
91
|
on<ToggleHand>(_onToggle);
|
|
85
92
|
on<_ParticipantRaised>(_onParticipantRaised);
|
|
86
93
|
on<_ParticipantLowered>(_onParticipantLowered);
|
|
87
94
|
|
|
88
|
-
// Self-register as the
|
|
89
|
-
|
|
95
|
+
// Self-register as the participant event listener (v5 split listener).
|
|
96
|
+
CallSession.getInstance()?.addParticipantEventListener(this);
|
|
90
97
|
}
|
|
91
98
|
|
|
92
99
|
void _onToggle(ToggleHand event, Emitter<RaiseHandState> emit) {
|
|
93
100
|
if (state.localRaised) {
|
|
94
|
-
|
|
101
|
+
CallSession.getInstance()?.lowerHand();
|
|
95
102
|
} else {
|
|
96
|
-
|
|
103
|
+
CallSession.getInstance()?.raiseHand();
|
|
97
104
|
}
|
|
98
105
|
emit(state.copyWith(localRaised: !state.localRaised));
|
|
99
106
|
}
|
|
@@ -114,7 +121,7 @@ class RaiseHandBloc extends Bloc<RaiseHandEvent, RaiseHandState>
|
|
|
114
121
|
emit(state.copyWith(raised: next));
|
|
115
122
|
}
|
|
116
123
|
|
|
117
|
-
//
|
|
124
|
+
// ParticipantEventListeners — bridge to Bloc events
|
|
118
125
|
@override
|
|
119
126
|
void onParticipantHandRaised(Participant p) {
|
|
120
127
|
add(_ParticipantRaised(p));
|
|
@@ -125,11 +132,11 @@ class RaiseHandBloc extends Bloc<RaiseHandEvent, RaiseHandState>
|
|
|
125
132
|
add(_ParticipantLowered(p));
|
|
126
133
|
}
|
|
127
134
|
|
|
128
|
-
// ... implement other
|
|
135
|
+
// ... implement other ParticipantEventListeners methods (no-ops or pass-through)
|
|
129
136
|
|
|
130
137
|
@override
|
|
131
138
|
Future<void> close() {
|
|
132
|
-
|
|
139
|
+
CallSession.getInstance()?.removeParticipantEventListener(this);
|
|
133
140
|
return super.close();
|
|
134
141
|
}
|
|
135
142
|
}
|
|
@@ -239,7 +246,7 @@ Web sister reference rules apply, plus V6-specific:
|
|
|
239
246
|
|
|
240
247
|
1. **`buildWhen` omitted.** Every state change rebuilds every BlocBuilder — lots of unnecessary work during a call. Add `buildWhen` for narrow rebuilds.
|
|
241
248
|
2. **Mutating `state.raised` directly** instead of creating a new list. `Equatable` props compare via `==`; mutation doesn't trigger rebuild.
|
|
242
|
-
3. **Calling `
|
|
249
|
+
3. **Calling `CallSession.getInstance()?.raiseHand()` outside the bloc.** Bypasses the state machine; UI doesn't update. Always go through `add(ToggleHand())`.
|
|
243
250
|
4. **Adding the SDK listener in `initState`** instead of the bloc constructor. Component-level lifecycle ≠ Bloc lifecycle. Bloc `close()` is the canonical place to clean up.
|
|
244
251
|
|
|
245
252
|
---
|
|
@@ -248,12 +255,12 @@ Web sister reference rules apply, plus V6-specific:
|
|
|
248
255
|
|
|
249
256
|
- [ ] `RaiseHandBloc` extends `Bloc<RaiseHandEvent, RaiseHandState>`
|
|
250
257
|
- [ ] `RaiseHandState` extends `Equatable` with proper `props`
|
|
251
|
-
- [ ] Bloc registers itself as `
|
|
252
|
-
- [ ] Bloc `close()` removes the listener
|
|
258
|
+
- [ ] Bloc registers itself as `ParticipantEventListeners` via `CallSession.getInstance()?.addParticipantEventListener(this)` in constructor
|
|
259
|
+
- [ ] Bloc `close()` removes the listener via `removeParticipantEventListener(this)`
|
|
253
260
|
- [ ] `BlocProvider(create:)` scopes the bloc to the call screen
|
|
254
261
|
- [ ] `buildWhen` on every BlocBuilder narrows rebuilds
|
|
255
262
|
- [ ] `Semantics` + `SemanticsService.announce` for a11y
|
|
256
|
-
- [ ] `hideRaiseHandButton
|
|
263
|
+
- [ ] `SessionSettingsBuilder().hideRaiseHandButton(true)` if custom UI
|
|
257
264
|
- [ ] Real-device smoke: 3 devices (iOS + Android), 2 raise hands, host sees both
|
|
258
265
|
- [ ] Hot-reload smoke: trigger raise → save code → bloc state survives (bloc is created via `create:`, persists across hot reload)
|
|
259
266
|
|
|
@@ -7,14 +7,15 @@ description: >
|
|
|
7
7
|
outgoing, ongoing, call logs), and shared views (avatar, badge, receipt, reactions,
|
|
8
8
|
bubbles, list base, search, status indicator).
|
|
9
9
|
license: "MIT"
|
|
10
|
-
compatibility: "cometchat_chat_uikit ^6.0.
|
|
11
|
-
allowed-tools: "shell, file-read, file-search, file-list, grep"
|
|
10
|
+
compatibility: "cometchat_chat_uikit ^6.0.1; flutter >=2.5.0"
|
|
12
11
|
metadata:
|
|
13
12
|
author: "CometChat"
|
|
14
13
|
version: "3.0.0"
|
|
15
14
|
tags: "cometchat flutter components widgets catalog props"
|
|
16
15
|
---
|
|
17
16
|
|
|
17
|
+
> **Ground truth:** `cometchat_chat_uikit: ^6.0` component catalog (pub-cache source) + `docs/ui-kit/flutter`. **Official docs:** https://www.cometchat.com/docs/ui-kit/flutter/components-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.
|
|
18
|
+
|
|
18
19
|
# CometChat Flutter UIKit v6 — Widget Catalog
|
|
19
20
|
|
|
20
21
|
Canonical reference for every public widget in `cometchat_chat_uikit`. Look up names, props, view slots, and style classes here before writing code.
|
|
@@ -23,7 +24,9 @@ Canonical reference for every public widget in `cometchat_chat_uikit`. Look up n
|
|
|
23
24
|
|
|
24
25
|
## Rule: NEVER_INVENT_NAMES
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
> ⛔ **Only the widgets in THIS catalog exist — do not invent or recall names from v4/older memory.** Before emitting any `CometChat*` widget, confirm it's listed below; if it's not here, it doesn't exist (→ "isn't a function/class" / undefined-name compile error). Do not invent names like `CometChatChat`, `CometChatMessenger`, `CometChatChatList`, `CometChatContactList`, `CometChatMessageView`, or `CometChatUserList` — they don't exist.
|
|
28
|
+
>
|
|
29
|
+
> **There is no all-in-one widget.** The v4-era composites `CometChatConversationsWithMessages` / `CometChatUsersWithMessages` / `CometChatGroupsWithMessages` / `CometChatMessages` and the `CometChatUI` god-widget were **removed in v6 and do NOT exist in `cometchat_chat_uikit` ^6.0** (verified against the v6 kit source — these names survive only in the CHANGELOG's removal history). Compose a two-pane experience yourself: `CometChatConversations` (list) → on `onItemTap`, push a messages screen hosting `CometChatMessageHeader` + `CometChatMessageList` + `CometChatMessageComposer` for the selected `User`/`Group` (each takes `user:` **or** `group:`, never both). See the Golden Path in `cometchat-flutter-v6-core`.
|
|
27
30
|
|
|
28
31
|
---
|
|
29
32
|
|
|
@@ -54,10 +57,10 @@ Displays messages for a 1:1 or group conversation with real-time updates, reacti
|
|
|
54
57
|
Text input with attachments, voice recording, rich text toolbar, mentions, and AI features.
|
|
55
58
|
|
|
56
59
|
- **Location:** `chat_ui/src/message_composer/widgets/cometchat_message_composer.dart`
|
|
57
|
-
- **Key props:** `user`, `group`, `parentMessageId`, `placeholderText`, `disableTypingEvents`, `text`, `onChange`, `onSendButtonTap`, `textFormatters`, `disableMentions`, `hideVoiceRecordingButton`, `richTextConfiguration`
|
|
60
|
+
- **Key props:** `user`, `group`, `parentMessageId`, `placeholderText`, `disableTypingEvents`, `text`, `onChange`, `onSendButtonTap`, `textFormatters`, `disableMentions`, `hideVoiceRecordingButton`, `enableRichTextFormatting`, `richTextToolbarView` (there is NO `richTextConfiguration` prop)
|
|
58
61
|
- **View slots:** `auxiliaryButtonView`, `secondaryButtonView`, `sendButtonView`, `headerView`, `footerView`, `richTextToolbarView`
|
|
59
62
|
- **Style:** `CometChatMessageComposerStyle`
|
|
60
|
-
- **Note:** Scaffold
|
|
63
|
+
- **Note:** On `^6.0.1`, the hosting Scaffold should use `resizeToAvoidBottomInset: true` (or omit it — `true` is the default). The composer clamps the keyboard height to `viewInsets` (kit fix ENG-34434), so `true` does not double-compensate. `false` was only the pre-6.0.1 workaround; if you see a double keyboard gap, upgrade the kit.
|
|
61
64
|
|
|
62
65
|
### CometChatMessageHeader
|
|
63
66
|
|
|
@@ -108,6 +111,16 @@ Full-screen search across conversations and messages with filter chips and dual-
|
|
|
108
111
|
- **View slots:** `conversationItemView(ctx, Conversation)`, `conversationSubtitleView(ctx, Conversation)`, `conversationLeadingView(ctx, Conversation)`, `conversationTailView(ctx, Conversation)`, `searchTextMessageView(ctx, TextMessage)`, `searchImageMessageView(ctx, MediaMessage)`, `emptyStateView`, `errorStateView`, `loadingStateView`, `initialStateView`
|
|
109
112
|
- **Style:** `CometChatSearchStyle`
|
|
110
113
|
|
|
114
|
+
### CometChatNotificationFeed
|
|
115
|
+
|
|
116
|
+
Full-screen in-app notification feed — a scrollable list of campaign/promotional notifications rendered as cards, with category filter chips, timestamp grouping, real-time updates, and engagement reporting. Distinct from push notifications: this is the in-app feed UI, not the OS-level push delivery.
|
|
117
|
+
|
|
118
|
+
- **Location:** `chat_ui/src/notification_feed/widgets/cometchat_notification_feed.dart`
|
|
119
|
+
- **Key props:** `title`, `showHeader`, `showBackButton`, `showFilterChips`, `headerView`, `scrollToItemId`, `notificationFeedRequestBuilder`, `notificationCategoriesRequestBuilder`, `onItemClick(NotificationFeedItem)`, `onActionClick(NotificationFeedItem, CometChatCardActionEvent)`, `onError(String)`, `onBackPress`, `cardThemeMode`, `cardThemeOverride`
|
|
120
|
+
- **View slots:** `emptyStateView`, `errorStateView`, `loadingStateView`
|
|
121
|
+
- **Style:** `CometChatNotificationFeedStyle`
|
|
122
|
+
- **Request builder:** `NotificationFeedRequestBuilder` (pass without `.build()`; component builds internally)
|
|
123
|
+
|
|
111
124
|
### CometChatThreadedHeader
|
|
112
125
|
|
|
113
126
|
Displays a parent message with reply count in a threaded conversation view. Listens for real-time reply count updates.
|
|
@@ -206,7 +219,7 @@ Unread count badge (red circle with number).
|
|
|
206
219
|
Message delivery receipt icons (sent, delivered, read).
|
|
207
220
|
|
|
208
221
|
- **Location:** `shared_ui/src/clean_architecture/presentation/views/misc/receipt/cometchat_receipt.dart`
|
|
209
|
-
- **Style:** `
|
|
222
|
+
- **Style:** `CometChatMessageReceiptStyle`
|
|
210
223
|
|
|
211
224
|
### CometChatReactions
|
|
212
225
|
|
|
@@ -263,7 +276,7 @@ Content widgets rendered inside `CometChatMessageBubble`. All accept optional `c
|
|
|
263
276
|
### CometChatImageBubble
|
|
264
277
|
|
|
265
278
|
- **Location:** `shared_ui/src/clean_architecture/presentation/views/bubbles/image_bubble/cometchat_image_bubble.dart`
|
|
266
|
-
- **Key props:** `imageUrl`, `
|
|
279
|
+
- **Key props:** `imageUrl`, `placeholderImage`, `placeHolderImagePackageName`, `onClick`, `height`, `width`, `margin`, `padding`, `metadata`
|
|
267
280
|
- **Style:** `CometChatImageBubbleStyle`
|
|
268
281
|
|
|
269
282
|
### CometChatVideoBubble
|
|
@@ -319,18 +332,26 @@ Modal confirmation dialog with title, message, confirm/cancel buttons. Call `.sh
|
|
|
319
332
|
- **Key props:** `context` (required), `title`, `messageText`, `confirmButtonText`, `cancelButtonText`, `onConfirm`, `onCancel`
|
|
320
333
|
- **Style:** `CometChatConfirmDialogStyle`
|
|
321
334
|
|
|
322
|
-
###
|
|
335
|
+
### CometchatMessageOptionSheet / CometChatAttachmentOptionSheet
|
|
323
336
|
|
|
324
|
-
Bottom
|
|
337
|
+
Bottom sheets used internally by the kit. `CometchatMessageOptionSheet` (note the lowercase "c" in "chat") shows message actions (copy, reply, delete, etc.); `CometChatAttachmentOptionSheet` shows attachment options. There is no widget named `CometChatActionSheet`.
|
|
325
338
|
|
|
326
|
-
- **Location:** `shared_ui/src/clean_architecture/presentation/views/misc/action_sheet/cometchat_action_sheet.dart`
|
|
339
|
+
- **Location:** `CometchatMessageOptionSheet` → `chat_ui/src/message_list/cometchat_message_option_sheet.dart`; `CometChatAttachmentOptionSheet` → `shared_ui/src/clean_architecture/presentation/views/misc/action_sheet/cometchat_action_sheet.dart`
|
|
327
340
|
- **Style:** `CometChatMessageOptionSheetStyle`, `CometChatAttachmentOptionSheetStyle`
|
|
328
341
|
|
|
329
342
|
---
|
|
330
343
|
|
|
331
344
|
## 6. AI Views
|
|
332
345
|
|
|
333
|
-
|
|
346
|
+
As of `6.0.1`, the following AI widgets are exported via the chat barrel (`shared_ui/cometchat_uikit_shared.dart`):
|
|
347
|
+
|
|
348
|
+
- `CometChatAIAssistantChatHistory` — chat_ui/src/ai_assistant_chat_history/widgets/cometchat_ai_assistant_chat_history.dart
|
|
349
|
+
- `CometChatAIConversationSummaryView` — shared_ui/src/views/ai_conversation_summary/cometchat_ai_conversation_summary_view.dart
|
|
350
|
+
- `CometChatAIAssistantBubble` — shared_ui/src/.../cometchat_ai_assistant_bubble.dart
|
|
351
|
+
- `CometChatAISmartRepliesView` — shared_ui/src/.../cometchat_ai_smart_replies_view.dart
|
|
352
|
+
- `CometChatAIConversationStarterView` — shared_ui/src/.../cometchat_ai_conversation_starter_view.dart
|
|
353
|
+
|
|
354
|
+
Note the `View` suffix on the summary, smart-replies, and conversation-starter classes — `CometChatAIConversationSummary`, `CometChatAISmartReplies`, and `CometChatAIConversationStarter` (without suffix) do NOT exist.
|
|
334
355
|
|
|
335
356
|
For AI behavior more broadly, the kit surfaces AI replies / summaries / starters inside the existing message list and composer when the matching dashboard extensions are enabled. Drive AI through extensions for the most stable path.
|
|
336
357
|
|