@cometchat/skills 4.4.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +55 -0
- package/.claude-plugin/plugin.json +14 -0
- package/CHANGELOG.md +36 -0
- package/LICENSE +21 -0
- package/README.md +41 -163
- package/RULES.md +114 -0
- package/bin/cometchat-skills.mjs +1180 -0
- package/bin/legacy-skills.json +95 -0
- package/catalogs/android-v6.json +1646 -0
- package/catalogs/flutter-v6.json +651 -0
- package/catalogs/ios-v5.json +1383 -0
- package/catalogs/rn-calls-v5.json +134 -0
- package/catalogs/rn-calls-v5.symbols.txt +58 -0
- package/catalogs/rn-sdk-v4.json +672 -0
- package/catalogs/rn-v5.json +449 -0
- package/catalogs/rn-v5.symbols.txt +216 -0
- package/catalogs/sdk-android-v5.json +514 -0
- package/contracts.android-calls-v5.json +122 -0
- package/contracts.android-v6.json +135 -0
- package/contracts.angular-v5.json +694 -0
- package/contracts.flutter-calls-v5.json +77 -0
- package/contracts.flutter-v6.json +126 -0
- package/contracts.ios-calls-v5.json +67 -0
- package/contracts.ios-v5.json +436 -0
- package/contracts.json +82 -0
- package/contracts.rn-calls-v5.json +77 -0
- package/contracts.rn-v5.json +727 -0
- package/contracts.sdk-android-v5.json +15 -0
- package/contracts.web-calls-v5.json +45 -0
- package/features.android-calls-v5.json +246 -0
- package/features.android-v6.json +65 -0
- package/features.angular-v5.json +521 -0
- package/features.flutter-calls-v5.json +286 -0
- package/features.flutter-v6.json +484 -0
- package/features.ios-calls-v5.json +236 -0
- package/features.ios-v5.json +573 -0
- package/features.json +61 -0
- package/features.rn-calls-v5.json +187 -0
- package/features.rn-v5.json +614 -0
- package/features.sdk-android-v5.json +40 -0
- package/features.sdk-jsv4.json +24 -0
- package/features.web-calls-v5.json +108 -0
- package/package.json +151 -74
- package/peers.yaml +312 -0
- package/registry/README.md +31 -0
- package/registry/android-calls-v5.json +54 -0
- package/registry/android-v6.json +137 -0
- package/registry/angular-v5.json +114 -0
- package/registry/flutter-calls-v5.json +54 -0
- package/registry/flutter-v6.json +119 -0
- package/registry/ios-calls-v5.json +59 -0
- package/registry/ios-v5.json +97 -0
- package/registry/rn-calls-v5.json +59 -0
- package/registry/rn-v5.json +129 -0
- package/registry/sdk-android-v5.json +53 -0
- package/registry/sdk-jsv4.json +53 -0
- package/registry/web-calls-v5.json +54 -0
- package/registry/web-v7.json +99 -0
- package/skills/cometchat/SKILL.md +42 -2096
- package/skills/cometchat-android-v5-calls-sdk/SKILL.md +206 -0
- package/skills/cometchat-android-v5-calls-sdk/references/build-truth.md +63 -0
- package/skills/cometchat-android-v5-calls-sdk/references/docs-map.md +119 -0
- package/skills/cometchat-android-v5-calls-sdk/references/method-map.md +53 -0
- package/skills/cometchat-android-v5-calls-sdk/references/pitfalls.md +72 -0
- package/skills/cometchat-android-v5-calls-sdk/references/ringing.md +92 -0
- package/skills/cometchat-android-v5-calls-sdk/references/user-switch.md +90 -0
- package/skills/cometchat-android-v5-sdk/SKILL.md +127 -0
- package/skills/cometchat-android-v5-sdk/references/app-surface.md +88 -0
- package/skills/cometchat-android-v5-sdk/references/docs-map.md +91 -0
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +51 -137
- package/skills/cometchat-android-v6-calls/SKILL.md +128 -413
- package/skills/cometchat-android-v6-compose-components/SKILL.md +84 -194
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +66 -411
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +154 -237
- package/skills/cometchat-android-v6-core/SKILL.md +236 -672
- package/skills/cometchat-android-v6-core/references/anti-patterns.md +31 -0
- package/skills/cometchat-android-v6-core/references/component-props.md +168 -0
- package/skills/cometchat-android-v6-core/references/docs-map.md +153 -0
- package/skills/cometchat-android-v6-core/references/layout.md +112 -0
- package/skills/cometchat-android-v6-core/references/lifecycle.md +75 -0
- package/skills/cometchat-android-v6-core/references/setup-credentials.md +105 -0
- package/skills/cometchat-android-v6-core/references/troubleshooting.md +36 -0
- package/skills/cometchat-android-v6-events/SKILL.md +46 -184
- package/skills/cometchat-android-v6-extensions/SKILL.md +39 -179
- package/skills/cometchat-android-v6-features/SKILL.md +74 -143
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +75 -193
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +67 -419
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +77 -223
- package/skills/cometchat-android-v6-migration/SKILL.md +67 -378
- package/skills/cometchat-android-v6-production/SKILL.md +40 -179
- package/skills/cometchat-android-v6-push/SKILL.md +39 -289
- package/skills/cometchat-android-v6-testing/SKILL.md +50 -265
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +70 -254
- package/skills/cometchat-angular-v5-calls/SKILL.md +193 -0
- package/skills/cometchat-angular-v5-components/SKILL.md +131 -0
- package/skills/cometchat-angular-v5-components/references/catalog.md +111 -0
- package/skills/cometchat-angular-v5-components/references/host-composed.md +46 -0
- package/skills/cometchat-angular-v5-core/SKILL.md +300 -0
- package/skills/cometchat-angular-v5-core/references/anti-patterns.md +49 -0
- package/skills/cometchat-angular-v5-core/references/component-props.md +55 -0
- package/skills/cometchat-angular-v5-core/references/dependencies.md +66 -0
- package/skills/cometchat-angular-v5-core/references/docs-map.md +132 -0
- package/skills/cometchat-angular-v5-core/references/layout.md +64 -0
- package/skills/cometchat-angular-v5-core/references/lifecycle.md +202 -0
- package/skills/cometchat-angular-v5-core/references/setup-credentials.md +137 -0
- package/skills/cometchat-angular-v5-core/references/theming.md +70 -0
- package/skills/cometchat-angular-v5-core/references/troubleshooting.md +27 -0
- package/skills/cometchat-angular-v5-customization/SKILL.md +94 -0
- package/skills/cometchat-angular-v5-features/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-features/references/custom-messages.md +133 -0
- package/skills/cometchat-angular-v5-features/references/formatters.md +28 -0
- package/skills/cometchat-angular-v5-features/references/host-composed-extensions.md +85 -0
- package/skills/cometchat-angular-v5-migration/SKILL.md +40 -0
- package/skills/cometchat-angular-v5-migration/references/migration-guide.md +165 -0
- package/skills/cometchat-angular-v5-patterns/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-placement/SKILL.md +133 -0
- package/skills/cometchat-angular-v5-placement/references/combined-app.md +174 -0
- package/skills/cometchat-angular-v5-placement/references/core-surface.md +199 -0
- package/skills/cometchat-angular-v5-production/SKILL.md +101 -0
- package/skills/cometchat-angular-v5-push/SKILL.md +61 -0
- package/skills/cometchat-angular-v5-testing/SKILL.md +112 -0
- package/skills/cometchat-angular-v5-troubleshooting/SKILL.md +96 -0
- package/skills/cometchat-flutter-v5-sdk/SKILL.md +188 -0
- package/skills/cometchat-flutter-v5-sdk/references/doc-corrections.md +55 -0
- package/skills/cometchat-flutter-v5-sdk/references/docs-map.md +211 -0
- package/skills/cometchat-flutter-v5-sdk/references/platform-notes.md +48 -0
- package/skills/cometchat-flutter-v5-sdk/references/transcription.md +87 -0
- package/skills/cometchat-flutter-v6-calls/SKILL.md +75 -389
- package/skills/cometchat-flutter-v6-components/SKILL.md +88 -361
- package/skills/cometchat-flutter-v6-core/SKILL.md +154 -593
- package/skills/cometchat-flutter-v6-core/references/anti-patterns.md +55 -0
- package/skills/cometchat-flutter-v6-core/references/docs-map.md +143 -0
- package/skills/cometchat-flutter-v6-core/references/layout.md +45 -0
- package/skills/cometchat-flutter-v6-core/references/lifecycle.md +87 -0
- package/skills/cometchat-flutter-v6-core/references/setup-credentials.md +84 -0
- package/skills/cometchat-flutter-v6-core/references/troubleshooting.md +26 -0
- package/skills/cometchat-flutter-v6-customization/SKILL.md +70 -712
- package/skills/cometchat-flutter-v6-events/SKILL.md +79 -174
- package/skills/cometchat-flutter-v6-features/SKILL.md +55 -394
- package/skills/cometchat-flutter-v6-migration/SKILL.md +68 -367
- package/skills/cometchat-flutter-v6-migration/references/migration-guide.md +131 -0
- package/skills/cometchat-flutter-v6-patterns/SKILL.md +61 -0
- package/skills/cometchat-flutter-v6-placement/SKILL.md +94 -381
- package/skills/cometchat-flutter-v6-production/SKILL.md +58 -615
- package/skills/cometchat-flutter-v6-push/SKILL.md +46 -455
- package/skills/cometchat-flutter-v6-testing/SKILL.md +68 -299
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +54 -878
- package/skills/cometchat-ios-calls/SKILL.md +112 -563
- package/skills/cometchat-ios-components/SKILL.md +44 -834
- package/skills/cometchat-ios-core/SKILL.md +181 -1068
- package/skills/cometchat-ios-core/references/anti-patterns.md +80 -0
- package/skills/cometchat-ios-core/references/docs-map.md +123 -0
- package/skills/cometchat-ios-core/references/install.md +23 -0
- package/skills/cometchat-ios-core/references/layout.md +186 -0
- package/skills/cometchat-ios-core/references/setup-credentials.md +197 -0
- package/skills/cometchat-ios-core/references/swiftui.md +91 -0
- package/skills/cometchat-ios-core/references/troubleshooting.md +100 -0
- package/skills/cometchat-ios-customization/SKILL.md +33 -968
- package/skills/cometchat-ios-features/SKILL.md +29 -738
- package/skills/cometchat-ios-migration/SKILL.md +39 -0
- package/skills/cometchat-ios-placement/SKILL.md +51 -729
- package/skills/cometchat-ios-push/SKILL.md +24 -602
- package/skills/cometchat-ios-v5-sdk/SKILL.md +161 -0
- package/skills/cometchat-ios-v5-sdk/references/docs-map.md +326 -0
- package/skills/cometchat-js-v5-sdk/SKILL.md +95 -0
- package/skills/cometchat-js-v5-sdk/references/docs-map.md +114 -0
- package/skills/cometchat-onboarding/SKILL.md +89 -0
- package/skills/cometchat-onboarding/references/archetypes.md +51 -0
- package/skills/cometchat-onboarding/references/calling-first.md +77 -0
- package/skills/cometchat-onboarding/references/not-in-this-pack.md +8 -0
- package/skills/cometchat-onboarding/references/plan-artifact.md +133 -0
- package/skills/cometchat-onboarding/references/platforms.md +90 -0
- package/skills/cometchat-react-native-bare-patterns/SKILL.md +120 -0
- package/skills/cometchat-react-native-calls/SKILL.md +200 -0
- package/skills/cometchat-react-native-components/SKILL.md +142 -0
- package/skills/cometchat-react-native-core/SKILL.md +313 -0
- package/skills/cometchat-react-native-core/references/anti-patterns.md +79 -0
- package/skills/cometchat-react-native-core/references/component-props.md +105 -0
- package/skills/cometchat-react-native-core/references/dependencies.md +62 -0
- package/skills/cometchat-react-native-core/references/docs-map.md +126 -0
- package/skills/cometchat-react-native-core/references/layout.md +61 -0
- package/skills/cometchat-react-native-core/references/lifecycle.md +64 -0
- package/skills/cometchat-react-native-core/references/setup-credentials.md +39 -0
- package/skills/cometchat-react-native-customization/SKILL.md +198 -0
- package/skills/cometchat-react-native-expo-patterns/SKILL.md +116 -0
- package/skills/cometchat-react-native-features/SKILL.md +122 -0
- package/skills/cometchat-react-native-migration/SKILL.md +103 -0
- package/skills/cometchat-react-native-placement/SKILL.md +158 -0
- package/skills/cometchat-react-native-production/SKILL.md +78 -0
- package/skills/cometchat-react-native-push/SKILL.md +88 -0
- package/skills/cometchat-react-native-sdk/SKILL.md +126 -0
- package/skills/cometchat-react-native-sdk/references/method-map.md +239 -0
- package/skills/cometchat-react-native-sdk/references/page-map.md +96 -0
- package/skills/cometchat-react-native-testing/SKILL.md +94 -0
- package/skills/cometchat-react-native-troubleshooting/SKILL.md +116 -0
- package/skills/cometchat-react-native-v5-sdk/SKILL.md +150 -0
- package/skills/cometchat-react-native-v5-sdk/references/docs-map.md +127 -0
- package/skills/cometchat-react-native-v5-sdk/references/ringing-voip.md +369 -0
- package/skills/cometchat-react-v7-calls/SKILL.md +75 -0
- package/skills/cometchat-react-v7-components/SKILL.md +72 -0
- package/skills/cometchat-react-v7-core/SKILL.md +101 -0
- package/skills/cometchat-react-v7-core/references/anti-patterns.md +19 -0
- package/skills/cometchat-react-v7-core/references/component-props.md +82 -0
- package/skills/cometchat-react-v7-core/references/dependencies.md +23 -0
- package/skills/cometchat-react-v7-core/references/docs-map.md +117 -0
- package/skills/cometchat-react-v7-core/references/i18n-rtl-a11y.md +22 -0
- package/skills/cometchat-react-v7-core/references/layout.md +158 -0
- package/skills/cometchat-react-v7-core/references/lifecycle.md +74 -0
- package/skills/cometchat-react-v7-core/references/setup-credentials.md +58 -0
- package/skills/cometchat-react-v7-core/references/ssr.md +11 -0
- package/skills/cometchat-react-v7-core/references/theming.md +52 -0
- package/skills/cometchat-react-v7-core/references/troubleshooting.md +28 -0
- package/skills/cometchat-react-v7-customization/SKILL.md +84 -0
- package/skills/cometchat-react-v7-features/SKILL.md +92 -0
- package/skills/cometchat-react-v7-migration/SKILL.md +39 -0
- package/skills/cometchat-react-v7-migration/references/migration-guide.md +119 -0
- package/skills/cometchat-react-v7-patterns/SKILL.md +43 -0
- package/skills/cometchat-react-v7-placement/SKILL.md +106 -0
- package/skills/cometchat-react-v7-placement/references/recipes.md +354 -0
- package/skills/cometchat-react-v7-push/SKILL.md +53 -0
- package/test-suite/README.md +70 -0
- package/test-suite/catalogs/android-calls-v5.json +830 -0
- package/test-suite/catalogs/android-calls-v5.symbols.txt +499 -0
- package/test-suite/catalogs/android-v6.json +1646 -0
- package/test-suite/catalogs/android-v6.symbols.txt +298 -0
- package/test-suite/catalogs/angular-v5.json +7587 -0
- package/test-suite/catalogs/flutter-calls-v5.json +196 -0
- package/test-suite/catalogs/flutter-calls-v5.symbols.txt +59 -0
- package/test-suite/catalogs/flutter-v6.json +651 -0
- package/test-suite/catalogs/ios-calls-v5.json +158 -0
- package/test-suite/catalogs/ios-calls-v5.symbols.txt +70 -0
- package/test-suite/catalogs/ios-v5.json +1383 -0
- package/test-suite/catalogs/ios-v5.symbols.txt +699 -0
- package/test-suite/catalogs/rn-calls-v5.json +134 -0
- package/test-suite/catalogs/rn-sdk-v4.json +672 -0
- package/test-suite/catalogs/rn-v5.json +449 -0
- package/test-suite/catalogs/sdk-android-v5.json +514 -0
- package/test-suite/catalogs/sdk-android-v5.symbols.txt +254 -0
- package/test-suite/catalogs/sdk-jsv4.json +800 -0
- package/test-suite/catalogs/web-calls-v5.json +195 -0
- package/test-suite/catalogs/web-v7.json +1243 -0
- package/test-suite/scripts/build-registry.mjs +113 -0
- package/test-suite/scripts/catalog-refresh-dart.mjs +151 -0
- package/test-suite/scripts/catalog-refresh.mjs +100 -0
- package/test-suite/scripts/lint-skills.mjs +909 -0
- package/test-suite/scripts/measure-tokens.mjs +169 -0
- package/test-suite/scripts/typecheck-fences-dart.mjs +437 -0
- package/test-suite/scripts/typecheck-fences-kotlin.mjs +269 -0
- package/test-suite/scripts/typecheck-fences.mjs +206 -0
- package/test-suite/scripts/verify-catalog.mjs +242 -0
- package/test-suite/scripts/verify-contract-fences.mjs +94 -0
- package/test-suite/scripts/verify-detection.mjs +178 -0
- package/test-suite/scripts/verify-docs-base.mjs +91 -0
- package/test-suite/scripts/verify-family-agnostic.mjs +130 -0
- package/test-suite/scripts/verify-golden-path.mjs +138 -0
- package/test-suite/scripts/verify-oracle-components.mjs +133 -0
- package/test-suite/scripts/verify-template-bindings.mjs +148 -0
- package/test-suite/typecheck/angular-v5/package.json +21 -0
- package/test-suite/typecheck/angular-v5/tsconfig.json +21 -0
- package/test-suite/typecheck/flutter-v6/analysis_options.yaml +25 -0
- package/test-suite/typecheck/flutter-v6/pubspec.yaml +21 -0
- package/test-suite/typecheck/web-v7/package.json +18 -0
- package/test-suite/typecheck/web-v7/tsconfig.json +19 -0
- package/bin/install.js +0 -1003
- package/skills/.claude-plugin/marketplace.json +0 -86
- package/skills/cometchat/references/asking-questions.md +0 -48
- package/skills/cometchat-a11y/SKILL.md +0 -477
- package/skills/cometchat-android-v5/SKILL.md +0 -121
- package/skills/cometchat-android-v5-calls/SKILL.md +0 -429
- package/skills/cometchat-android-v5-calls/references/README.md +0 -53
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +0 -197
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +0 -91
- package/skills/cometchat-android-v5-calls/references/background-handling.md +0 -168
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +0 -131
- package/skills/cometchat-android-v5-calls/references/call-logs.md +0 -113
- package/skills/cometchat-android-v5-calls/references/call-session.md +0 -274
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +0 -150
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +0 -123
- package/skills/cometchat-android-v5-calls/references/group-calls.md +0 -205
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +0 -117
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +0 -134
- package/skills/cometchat-android-v5-calls/references/join-session.md +0 -120
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +0 -222
- package/skills/cometchat-android-v5-calls/references/participant-management.md +0 -110
- package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +0 -106
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +0 -248
- package/skills/cometchat-android-v5-calls/references/recording.md +0 -101
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +0 -152
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +0 -78
- package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +0 -215
- package/skills/cometchat-android-v5-calls/references/session-settings.md +0 -121
- package/skills/cometchat-android-v5-calls/references/setup.md +0 -137
- package/skills/cometchat-android-v5-calls/references/share-invite.md +0 -156
- package/skills/cometchat-android-v5-calls/references/video-controls.md +0 -87
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +0 -526
- package/skills/cometchat-android-v5-components/SKILL.md +0 -431
- package/skills/cometchat-android-v5-core/SKILL.md +0 -486
- package/skills/cometchat-android-v5-customization/SKILL.md +0 -469
- package/skills/cometchat-android-v5-extensions/SKILL.md +0 -127
- package/skills/cometchat-android-v5-features/SKILL.md +0 -131
- package/skills/cometchat-android-v5-placement/SKILL.md +0 -277
- package/skills/cometchat-android-v5-production/SKILL.md +0 -95
- package/skills/cometchat-android-v5-push/SKILL.md +0 -619
- package/skills/cometchat-android-v5-testing/SKILL.md +0 -188
- package/skills/cometchat-android-v5-theming/SKILL.md +0 -167
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +0 -74
- package/skills/cometchat-android-v6/SKILL.md +0 -108
- package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +0 -97
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +0 -87
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +0 -100
- package/skills/cometchat-android-v6-calls/references/call-session.md +0 -163
- package/skills/cometchat-android-v6-calls/references/device-management.md +0 -172
- package/skills/cometchat-android-v6-calls/references/group-calls.md +0 -191
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +0 -110
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +0 -141
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +0 -188
- package/skills/cometchat-android-v6-calls/references/ringing-integration.md +0 -176
- package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +0 -127
- package/skills/cometchat-android-v6-calls/references/share-invite.md +0 -105
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +0 -250
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +0 -233
- package/skills/cometchat-angular-calls/SKILL.md +0 -380
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +0 -96
- package/skills/cometchat-angular-calls/references/call-layouts.md +0 -123
- package/skills/cometchat-angular-calls/references/call-session.md +0 -167
- package/skills/cometchat-angular-calls/references/custom-ui.md +0 -239
- package/skills/cometchat-angular-calls/references/device-management.md +0 -154
- package/skills/cometchat-angular-calls/references/group-calls.md +0 -433
- package/skills/cometchat-angular-calls/references/idle-timeout.md +0 -161
- package/skills/cometchat-angular-calls/references/in-call-chat.md +0 -148
- package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +0 -205
- package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +0 -53
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +0 -184
- package/skills/cometchat-angular-calls/references/picture-in-picture.md +0 -285
- package/skills/cometchat-angular-calls/references/raise-hand.md +0 -172
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +0 -260
- package/skills/cometchat-angular-calls/references/ringing-integration.md +0 -133
- package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +0 -100
- package/skills/cometchat-angular-calls/references/share-invite.md +0 -122
- package/skills/cometchat-angular-calls/references/virtual-background.md +0 -29
- package/skills/cometchat-angular-components/SKILL.md +0 -235
- package/skills/cometchat-angular-core/SKILL.md +0 -386
- package/skills/cometchat-angular-customization/SKILL.md +0 -616
- package/skills/cometchat-angular-features/SKILL.md +0 -329
- package/skills/cometchat-angular-patterns/SKILL.md +0 -256
- package/skills/cometchat-angular-placement/SKILL.md +0 -314
- package/skills/cometchat-angular-production/SKILL.md +0 -564
- package/skills/cometchat-angular-push/SKILL.md +0 -389
- package/skills/cometchat-angular-testing/SKILL.md +0 -605
- package/skills/cometchat-angular-theming/SKILL.md +0 -290
- package/skills/cometchat-angular-troubleshooting/SKILL.md +0 -364
- package/skills/cometchat-astro-patterns/SKILL.md +0 -708
- package/skills/cometchat-calls/SKILL.md +0 -364
- package/skills/cometchat-calls/references/use-case-broadcast.md +0 -199
- package/skills/cometchat-calls/references/use-case-marketplace.md +0 -157
- package/skills/cometchat-calls/references/use-case-support.md +0 -189
- package/skills/cometchat-calls/references/use-case-team.md +0 -180
- package/skills/cometchat-calls/references/use-case-telehealth.md +0 -153
- package/skills/cometchat-components/SKILL.md +0 -1142
- package/skills/cometchat-core/SKILL.md +0 -1048
- package/skills/cometchat-customization/SKILL.md +0 -580
- package/skills/cometchat-customization/references/component-catalog.md +0 -236
- package/skills/cometchat-features/SKILL.md +0 -861
- package/skills/cometchat-flutter-v5/SKILL.md +0 -173
- package/skills/cometchat-flutter-v5-calls/SKILL.md +0 -455
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +0 -193
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +0 -103
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +0 -285
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +0 -124
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +0 -181
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +0 -99
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +0 -135
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +0 -210
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +0 -255
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +0 -196
- package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +0 -101
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +0 -148
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +0 -118
- package/skills/cometchat-flutter-v5-core/SKILL.md +0 -239
- package/skills/cometchat-flutter-v5-customization/SKILL.md +0 -358
- package/skills/cometchat-flutter-v5-events/SKILL.md +0 -156
- package/skills/cometchat-flutter-v5-messages/SKILL.md +0 -259
- package/skills/cometchat-flutter-v5-production/SKILL.md +0 -216
- package/skills/cometchat-flutter-v5-push/SKILL.md +0 -285
- package/skills/cometchat-flutter-v5-testing/SKILL.md +0 -401
- package/skills/cometchat-flutter-v5-theming/SKILL.md +0 -161
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +0 -130
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +0 -152
- package/skills/cometchat-flutter-v6/SKILL.md +0 -446
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +0 -136
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +0 -89
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +0 -229
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +0 -190
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +0 -88
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +0 -125
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +0 -275
- package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +0 -171
- package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +0 -93
- package/skills/cometchat-flutter-v6-calls/references/share-invite.md +0 -102
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +0 -238
- package/skills/cometchat-flutter-v6-messages/SKILL.md +0 -384
- package/skills/cometchat-flutter-v6-theming/SKILL.md +0 -293
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +0 -224
- package/skills/cometchat-i18n/SKILL.md +0 -419
- package/skills/cometchat-ios/SKILL.md +0 -325
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +0 -181
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +0 -45
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +0 -188
- package/skills/cometchat-ios-calls/references/call-layouts.md +0 -76
- package/skills/cometchat-ios-calls/references/call-session.md +0 -218
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +0 -357
- package/skills/cometchat-ios-calls/references/custom-ui.md +0 -322
- package/skills/cometchat-ios-calls/references/device-management.md +0 -171
- package/skills/cometchat-ios-calls/references/group-calls.md +0 -359
- package/skills/cometchat-ios-calls/references/idle-timeout.md +0 -184
- package/skills/cometchat-ios-calls/references/in-call-chat.md +0 -179
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +0 -196
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +0 -246
- package/skills/cometchat-ios-calls/references/raise-hand.md +0 -26
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +0 -252
- package/skills/cometchat-ios-calls/references/ringing-integration.md +0 -143
- package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +0 -267
- package/skills/cometchat-ios-calls/references/share-invite.md +0 -148
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +0 -246
- package/skills/cometchat-ios-calls/references/voip-cert-setup.md +0 -166
- package/skills/cometchat-ios-production/SKILL.md +0 -738
- package/skills/cometchat-ios-testing/SKILL.md +0 -376
- package/skills/cometchat-ios-theming/SKILL.md +0 -667
- package/skills/cometchat-ios-troubleshooting/SKILL.md +0 -1003
- package/skills/cometchat-native-bare-patterns/SKILL.md +0 -550
- package/skills/cometchat-native-calls/SKILL.md +0 -671
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +0 -203
- package/skills/cometchat-native-calls/references/call-layouts.md +0 -125
- package/skills/cometchat-native-calls/references/call-session.md +0 -182
- package/skills/cometchat-native-calls/references/custom-ui.md +0 -254
- package/skills/cometchat-native-calls/references/device-management.md +0 -158
- package/skills/cometchat-native-calls/references/expo-vs-bare.md +0 -179
- package/skills/cometchat-native-calls/references/group-calls.md +0 -296
- package/skills/cometchat-native-calls/references/idle-timeout.md +0 -128
- package/skills/cometchat-native-calls/references/in-call-chat.md +0 -145
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +0 -72
- package/skills/cometchat-native-calls/references/picture-in-picture.md +0 -276
- package/skills/cometchat-native-calls/references/raise-hand.md +0 -205
- package/skills/cometchat-native-calls/references/recording-screen-share.md +0 -169
- package/skills/cometchat-native-calls/references/ringing-integration.md +0 -118
- package/skills/cometchat-native-calls/references/server-push-bridge.md +0 -135
- package/skills/cometchat-native-calls/references/server-push-payloads.md +0 -193
- package/skills/cometchat-native-calls/references/share-invite.md +0 -146
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +0 -319
- package/skills/cometchat-native-components/SKILL.md +0 -628
- package/skills/cometchat-native-core/SKILL.md +0 -679
- package/skills/cometchat-native-customization/SKILL.md +0 -716
- package/skills/cometchat-native-expo-patterns/SKILL.md +0 -552
- package/skills/cometchat-native-features/SKILL.md +0 -638
- package/skills/cometchat-native-placement/SKILL.md +0 -509
- package/skills/cometchat-native-production/SKILL.md +0 -700
- package/skills/cometchat-native-push/SKILL.md +0 -594
- package/skills/cometchat-native-testing/SKILL.md +0 -582
- package/skills/cometchat-native-theming/SKILL.md +0 -681
- package/skills/cometchat-native-troubleshooting/SKILL.md +0 -501
- package/skills/cometchat-nextjs-patterns/SKILL.md +0 -899
- package/skills/cometchat-placement/SKILL.md +0 -1360
- package/skills/cometchat-production/SKILL.md +0 -1027
- package/skills/cometchat-react-calls/SKILL.md +0 -752
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +0 -146
- package/skills/cometchat-react-calls/references/call-layouts.md +0 -160
- package/skills/cometchat-react-calls/references/call-session.md +0 -235
- package/skills/cometchat-react-calls/references/custom-ui.md +0 -247
- package/skills/cometchat-react-calls/references/device-management.md +0 -210
- package/skills/cometchat-react-calls/references/group-calls.md +0 -257
- package/skills/cometchat-react-calls/references/idle-timeout.md +0 -188
- package/skills/cometchat-react-calls/references/in-call-chat.md +0 -212
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +0 -170
- package/skills/cometchat-react-calls/references/picture-in-picture.md +0 -245
- package/skills/cometchat-react-calls/references/raise-hand.md +0 -238
- package/skills/cometchat-react-calls/references/recording-screen-share.md +0 -144
- package/skills/cometchat-react-calls/references/ringing-integration.md +0 -255
- package/skills/cometchat-react-calls/references/server-web-push-vapid.md +0 -241
- package/skills/cometchat-react-calls/references/share-invite.md +0 -175
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +0 -216
- package/skills/cometchat-react-calls/references/virtual-background.md +0 -32
- package/skills/cometchat-react-calls/references/voip-and-web-push.md +0 -165
- package/skills/cometchat-react-patterns/SKILL.md +0 -628
- package/skills/cometchat-react-push/SKILL.md +0 -634
- package/skills/cometchat-react-router-patterns/SKILL.md +0 -758
- package/skills/cometchat-react-testing/SKILL.md +0 -413
- package/skills/cometchat-theming/SKILL.md +0 -498
- package/skills/cometchat-troubleshooting/SKILL.md +0 -294
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-flutter-v6-patterns
|
|
3
|
+
description: "Project wiring for the Flutter v6 UI Kit — navigation (Navigator / go_router / auto_route), state management (bloc / riverpod / provider / getx), config & secrets, platform setup, and web/desktop caveats. Triggers: 'cometchat with go_router', 'cometchat with riverpod', 'where do I put init in flutter', 'dart-define cometchat', 'cometchat flutter web'."
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "Flutter >=3.38.9; cometchat_chat_uikit ^6 (6.1.x, verified 6.1.0)"
|
|
6
|
+
metadata:
|
|
7
|
+
author: "CometChat"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "cometchat flutter patterns navigation state-management go-router riverpod config v6"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> **Ground truth:** the CometChat side is `cometchat-flutter-v6-core`; this skill only adds the DELTA for a given toolchain. Framework mechanics (go_router, riverpod, `--dart-define`) are baked Flutter knowledge, not kit API. Kit symbols come from the catalog.
|
|
13
|
+
|
|
14
|
+
## Companion skills (read first)
|
|
15
|
+
- `cometchat-flutter-v6-core` — install, credentials, the settings asset, `init→login→render`. This skill ASSUMES it.
|
|
16
|
+
- `cometchat-flutter-v6-placement` — WHERE the surface goes; this skill is HOW it hooks into your app's plumbing.
|
|
17
|
+
|
|
18
|
+
## Use this skill when
|
|
19
|
+
Wiring the kit into a specific project shape, or debugging "where does init go" / "the theme resets on navigation" / "my secrets are in git".
|
|
20
|
+
|
|
21
|
+
## Prerequisites & install
|
|
22
|
+
Covered by core. No new package.
|
|
23
|
+
|
|
24
|
+
## Navigation (BAKED — the delta per router)
|
|
25
|
+
The kit uses plain `Navigator.push`/`pop` internally and in every recipe, which works under **all** of these — you do not have to convert its recipes.
|
|
26
|
+
|
|
27
|
+
- **Plain `Navigator`** — nothing to do. Core's recipes are already this.
|
|
28
|
+
- **`go_router`** — register chat screens as routes and push with `context.push('/chat/:uid')`. The kit's own internal pops still work because go_router sits on the same `Navigator`. Put the **init/login gate above the router** (wrap `MaterialApp.router`'s builder, or gate in `redirect`) so no chat route can build before login resolves.
|
|
29
|
+
- **`auto_route`** — same principle: an `AutoRouteGuard` that waits for login is the idiomatic gate.
|
|
30
|
+
- **Calling adds one requirement**: `navigatorKey: CallNavigationContext.navigatorKey` on `MaterialApp` (→ `-calls`). With `go_router`, pass the same key into the router config rather than creating a second one.
|
|
31
|
+
|
|
32
|
+
## State management (BAKED)
|
|
33
|
+
The kit is **self-contained** — every widget drives its own BLoC internally. You do **not** wire the kit into your app's state layer, and you do not need `flutter_bloc` yourself.
|
|
34
|
+
- **bloc / cubit** — expose the logged-in user from your auth cubit; gate chat routes on it. Do not try to own the kit's internal blocs.
|
|
35
|
+
- **riverpod** — a `FutureProvider` that performs `initFromSettings` + `login` and which chat screens `.when(...)` on, is the cleanest gate.
|
|
36
|
+
- **provider / getx** — same shape: one async init future, everything chat-related below it.
|
|
37
|
+
- **Reading kit state** — `CometChatUIKit.loggedInUser` is the sync getter. For list state, use the widget's `stateCallBack` / `onLoad`, not a global store.
|
|
38
|
+
|
|
39
|
+
## Config & secrets (BAKED — Flutter-specific)
|
|
40
|
+
`initFromSettings` reads a **bundled asset**, so it cannot read `--dart-define`. Two honest options; state the trade-off and let the user choose:
|
|
41
|
+
1. **Keep `initFromSettings`** and generate `cometchat-settings.json` at build time from your existing secret source (CI writes the file). Keeps `integrationSource="ai-agent"` telemetry.
|
|
42
|
+
2. **Use the classic `UIKitSettingsBuilder` + `CometChatUIKit.init(...)`** with `--dart-define` values. Works, but loses telemetry attribution.
|
|
43
|
+
> Either way the Auth Key ends up in the app bundle and is **dev-only** — production means a server-minted auth token + `loginWithAuthToken` (core's `lifecycle.md`). Do NOT gitignore the registered `cometchat-settings.json` asset (a fresh clone / CI build then fails with *"No file or variants found for asset"*) — commit a **placeholder** version (no real Auth Key) that dev/CI overwrite, and guard the real key with a pre-commit/CI check.
|
|
44
|
+
|
|
45
|
+
## Platform setup (BAKED)
|
|
46
|
+
- **Android** — `minSdk = 26` in `android/app/build.gradle.kts` (the docs' 24 is too low); INTERNET permission; calling adds camera/mic.
|
|
47
|
+
- **iOS** — `platform :ios, '15.1'` in the Podfile, then `pod install`; photo/camera/mic usage strings for attachments and calls. Both floors come from `cometchat_calls_sdk`, which the kit depends on unconditionally — they apply whether or not you use calling (DOCS-BACKLOG D7).
|
|
48
|
+
- **Web** — the kit supports web, but plugin-backed features (media picker, calling) behave differently; verify anything you promise. `flutter run -d chrome` with the same settings asset.
|
|
49
|
+
- **Desktop** — not a documented target; if asked, say so honestly rather than guessing.
|
|
50
|
+
|
|
51
|
+
## Common pitfalls (BAKED)
|
|
52
|
+
- **Init inside a screen that can be re-entered** (or inside a route builder) → repeated init. Gate ONCE at the root (`lifecycle.md`).
|
|
53
|
+
- **A chat route reachable before login resolves** → blank screen. Guard the route, not just the widget.
|
|
54
|
+
- **Expecting `initFromSettings` to read `--dart-define`** — it reads an asset. See above.
|
|
55
|
+
- **Adding `flutter_bloc` to "connect" the kit** — unnecessary; the kit owns its blocs.
|
|
56
|
+
- **Two navigator keys** when calling is on — the router and `CallNavigationContext` must share one.
|
|
57
|
+
- **`cometchat-settings.json` committed** — the Auth Key is in your repo.
|
|
58
|
+
- **Forgetting `WidgetsFlutterBinding.ensureInitialized()`** before an asset-reading init.
|
|
59
|
+
|
|
60
|
+
## Verify it works
|
|
61
|
+
The app builds on each target platform you claim; chat routes are unreachable until login resolves; navigating away and back does not re-init; secrets are not in git; with calling on, an incoming call presents from any route.
|
|
@@ -1,279 +1,109 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cometchat-flutter-v6-placement
|
|
3
|
-
description:
|
|
4
|
-
Use when deciding WHERE to put CometChat in a Flutter app. Covers placement patterns:
|
|
5
|
-
tab-based home (IndexedStack), Navigator.push messages screen, modal/bottom sheet chat,
|
|
6
|
-
thread overlay, embedded panel, and floating widget. Includes Scaffold configuration,
|
|
7
|
-
resizeToAvoidBottomInset, SafeArea, and keyboard-aware spacing patterns.
|
|
8
|
-
Triggers on "add chat to my app", "where to put chat", "messages screen layout",
|
|
9
|
-
"tab bar with chat", "chat in modal", "chat in drawer", "embedded chat",
|
|
10
|
-
"Scaffold layout", or "keyboard handling".
|
|
3
|
+
description: "Where CometChat chat lives in a Flutter app and how to wire each shape — a tab-based app, a chat tab inside an existing app, a full-screen route, a modal / bottom-sheet chat, or an embedded panel. Triggers: 'add a chat tab', 'full screen chat page flutter', 'chat bottom sheet', 'embed chat in my screen', 'build a full chat app in flutter'."
|
|
11
4
|
license: "MIT"
|
|
12
|
-
compatibility: "cometchat_chat_uikit ^6.
|
|
5
|
+
compatibility: "Flutter >=3.38.9; cometchat_chat_uikit ^6 (6.1.x, verified 6.1.0)"
|
|
13
6
|
metadata:
|
|
14
7
|
author: "CometChat"
|
|
15
|
-
version: "
|
|
16
|
-
tags: "cometchat flutter placement
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "cometchat flutter placement layout navigation tabs bottom-sheet v6"
|
|
17
10
|
---
|
|
18
11
|
|
|
19
|
-
> **Ground truth:**
|
|
12
|
+
> **Ground truth:** every widget below is in `catalogs/flutter-v6.json`. The recipes follow the official guides (`flutter-tab-based-chat` · `multi-tab-chat-ui-guide` · `flutter-conversation` · `flutter-one-to-one-chat`) via `../cometchat-flutter-v6-core/references/docs-map.md`. Sizing follows the ONE mobile standard in `../cometchat-flutter-v6-core/references/layout.md` — change sizing rules THERE, not here.
|
|
20
13
|
|
|
21
|
-
|
|
14
|
+
## Companion skills (read first)
|
|
15
|
+
- `cometchat-flutter-v6-core` — install, credentials, `init→login→render`, the golden-path screens. This skill ASSUMES it.
|
|
16
|
+
- `cometchat-flutter-v6-components` — the widget catalog these compose.
|
|
22
17
|
|
|
23
|
-
|
|
18
|
+
## Use this skill when
|
|
19
|
+
Deciding or wiring WHERE chat lives — either (a) **growing the core surface into the full tab-based app**, or (b) a scoped-down placement: a chat tab in an existing app, a modal/bottom sheet, or an embedded panel. A plain unscoped "add chat" is NOT this skill — that is the core surface in `-core`.
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- Read `cometchat-flutter-v6-components` for component names and props (when available)
|
|
21
|
+
## Prerequisites & install
|
|
22
|
+
Covered by core. No new package.
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
| Messaging app | Tab-based home (full screen) | IndexedStack + CometChatConversations + Messages screen |
|
|
36
|
-
| Marketplace / platform | Navigator.push from product page | Single-thread messages screen |
|
|
37
|
-
| SaaS / dashboard | Modal or bottom sheet | CometChatConversations in BottomSheet |
|
|
38
|
-
| Social / community | Tab-based home with calls | IndexedStack + Conversations + CallLogs + Users + Groups |
|
|
39
|
-
| Support / helpdesk | Floating action button → modal | FAB + showModalBottomSheet |
|
|
40
|
-
| Just exploring | Replace home page | CometChatConversations as Scaffold body |
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Pattern 1: Tab-Based Home (Most Common)
|
|
45
|
-
|
|
46
|
-
BottomNavigationBar with IndexedStack to preserve tab state. This is what master_app uses.
|
|
47
|
-
|
|
48
|
-
```dart
|
|
49
|
-
class HomeScreen extends StatefulWidget {
|
|
50
|
-
const HomeScreen({super.key});
|
|
51
|
-
@override
|
|
52
|
-
State<HomeScreen> createState() => _HomeScreenState();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
class _HomeScreenState extends State<HomeScreen> {
|
|
56
|
-
int _currentIndex = 0;
|
|
57
|
-
|
|
58
|
-
@override
|
|
59
|
-
Widget build(BuildContext context) {
|
|
60
|
-
return Scaffold(
|
|
61
|
-
body: IndexedStack(
|
|
62
|
-
index: _currentIndex,
|
|
63
|
-
children: [
|
|
64
|
-
// Tab 0: Conversations
|
|
65
|
-
CometChatConversations(
|
|
66
|
-
hideAppbar: true,
|
|
67
|
-
onItemTap: (conversation) => _openChat(context, conversation),
|
|
68
|
-
),
|
|
69
|
-
// Tab 1: Call Logs
|
|
70
|
-
CometChatCallLogs(hideAppbar: true),
|
|
71
|
-
// Tab 2: Users
|
|
72
|
-
CometChatUsers(
|
|
73
|
-
hideAppbar: true,
|
|
74
|
-
onItemTap: (_, user) => _pushMessages(context, user: user),
|
|
75
|
-
),
|
|
76
|
-
// Tab 3: Groups
|
|
77
|
-
CometChatGroups(
|
|
78
|
-
hideAppbar: true,
|
|
79
|
-
onItemTap: (_, group) => _pushMessages(context, group: group),
|
|
80
|
-
),
|
|
81
|
-
],
|
|
82
|
-
),
|
|
83
|
-
bottomNavigationBar: BottomNavigationBar(
|
|
84
|
-
currentIndex: _currentIndex,
|
|
85
|
-
onTap: (i) => setState(() => _currentIndex = i),
|
|
86
|
-
type: BottomNavigationBarType.fixed,
|
|
87
|
-
items: const [
|
|
88
|
-
BottomNavigationBarItem(icon: Icon(Icons.chat_outlined), label: 'Chats'),
|
|
89
|
-
BottomNavigationBarItem(icon: Icon(Icons.call_outlined), label: 'Calls'),
|
|
90
|
-
BottomNavigationBarItem(icon: Icon(Icons.person_outline), label: 'Users'),
|
|
91
|
-
BottomNavigationBarItem(icon: Icon(Icons.people_outline), label: 'Groups'),
|
|
92
|
-
],
|
|
93
|
-
),
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
void _openChat(BuildContext context, Conversation conversation) {
|
|
98
|
-
final user = conversation.conversationWith is User
|
|
99
|
-
? conversation.conversationWith as User : null;
|
|
100
|
-
final group = conversation.conversationWith is Group
|
|
101
|
-
? conversation.conversationWith as Group : null;
|
|
102
|
-
_pushMessages(context, user: user, group: group);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
void _pushMessages(BuildContext context, {User? user, Group? group}) {
|
|
106
|
-
Navigator.push(context, MaterialPageRoute(
|
|
107
|
-
builder: (_) => MessagesScreen(user: user, group: group),
|
|
108
|
-
));
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Key details:**
|
|
114
|
-
- `IndexedStack` keeps all tabs alive — no re-fetch when switching tabs
|
|
115
|
-
- `hideAppbar: true` on all components — the parent Scaffold provides the AppBar
|
|
116
|
-
- `onItemTap` extracts `User`/`Group` from `conversation.conversationWith`
|
|
117
|
-
- Protected groups need a join/password screen before navigating to messages
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## Pattern 2: Messages Screen (Navigator.push)
|
|
24
|
+
## The one invariant every placement shares
|
|
25
|
+
Mobile shows **one screen at a time**, so placement is a NAVIGATION problem, not a column problem:
|
|
26
|
+
1. **Bounded height** — every kit list needs `Expanded`/`Flexible` or a fixed height. Unbounded ⇒ exception or a zero-height list.
|
|
27
|
+
2. **`Scaffold` + `SafeArea`**, `resizeToAvoidBottomInset` left at `true`.
|
|
28
|
+
3. **Round-trip** — everything you push must pop back to the state that opened it.
|
|
29
|
+
4. **One init/login gate at the root**, not per screen (core's `lifecycle.md`).
|
|
122
30
|
|
|
123
|
-
|
|
31
|
+
## Placement patterns (BAKED)
|
|
124
32
|
|
|
33
|
+
**A. Tab-based app (the GROW target — the full app).** Bottom tabs: Chats (`CometChatConversations`) · Users (`CometChatUsers`) · Groups (`CometChatGroups`) · Calls (`CometChatCallLogs`), each pushing the message screen. **Incoming calls need NO widget from you** — once calling is enabled the kit's `CallEventService` presents the incoming-call overlay itself from any tab; you only set `navigatorKey: CallNavigationContext.navigatorKey` on your `MaterialApp` (see `-calls`). Do NOT mount `CometChatIncomingCall` at the root yourself — that plus the kit's own overlay = a double incoming screen. Build from `flutter-tab-based-chat`. Note `hideAppbar: true` on the list widgets when your own `Scaffold` already supplies one, or you get two headers.
|
|
125
34
|
```dart
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
Widget build(BuildContext context) {
|
|
148
|
-
final colorPalette = CometChatThemeHelper.getColorPalette(context);
|
|
149
|
-
return Scaffold(
|
|
150
|
-
resizeToAvoidBottomInset: true, // matches sample app; composer clamps to viewInsets (ENG-34434)
|
|
151
|
-
appBar: CometChatMessageHeader(
|
|
152
|
-
user: _user,
|
|
153
|
-
group: _group,
|
|
154
|
-
onBack: () => Navigator.pop(context),
|
|
155
|
-
),
|
|
156
|
-
body: SafeArea(
|
|
157
|
-
top: false, // Header is the appBar — top inset already handled; keep bottom inset
|
|
158
|
-
child: Container(
|
|
159
|
-
color: colorPalette.background3,
|
|
160
|
-
child: Column(
|
|
161
|
-
children: [
|
|
162
|
-
Expanded(child: CometChatMessageList(user: _user, group: _group)),
|
|
163
|
-
CometChatMessageComposer(user: _user, group: _group),
|
|
164
|
-
],
|
|
165
|
-
),
|
|
166
|
-
),
|
|
167
|
-
),
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
35
|
+
// Tab-based placement: four list components + group details + global search
|
|
36
|
+
// Users tab
|
|
37
|
+
CometChatUsers(
|
|
38
|
+
hideAppbar: true,
|
|
39
|
+
onItemTap: (user) => Navigator.push(context, MaterialPageRoute(builder: (_) => MessageScreen(user: user))),
|
|
40
|
+
)
|
|
41
|
+
// Groups tab
|
|
42
|
+
CometChatGroups(
|
|
43
|
+
hideAppbar: true,
|
|
44
|
+
onItemTap: (group) => Navigator.push(context, MaterialPageRoute(builder: (_) => MessageScreen(group: group))),
|
|
45
|
+
)
|
|
46
|
+
// Group details: members + kick/ban/scope built in
|
|
47
|
+
CometChatGroupMembers(group: group, hideAppbar: true)
|
|
48
|
+
// Global search from conversations list (onSearchTap -> push this screen). Result callbacks are
|
|
49
|
+
// onConversationClicked/onMessageClicked — verified against kit 6.1.0 and the live search page
|
|
50
|
+
// (DOCS-BACKLOG F3 corrected upstream).
|
|
51
|
+
CometChatSearch(
|
|
52
|
+
onConversationClicked: (conv) { Navigator.pop(context); openChat(conv); },
|
|
53
|
+
onMessageClicked: (msg) { Navigator.pop(context); openChat(msg); },
|
|
54
|
+
onBack: () => Navigator.pop(context),
|
|
55
|
+
)
|
|
171
56
|
```
|
|
172
|
-
|
|
173
|
-
### Critical Scaffold Rules
|
|
174
|
-
|
|
175
|
-
1. `resizeToAvoidBottomInset: true` (or omit — `true` is the Scaffold default) — matches the kit sample app (`messages_screen.dart` defaults it; `thread_screen.dart` sets it `true`). The composer clamps the native keyboard height to Flutter's `viewInsets` (kit fix ENG-34434), so `true` does NOT double-compensate on `^6.0.1`. (Pre-6.0.1 kits double-compensated with `true`; `false` was the old workaround — if you see a double keyboard gap, upgrade the kit.)
|
|
176
|
-
2. `SafeArea(top: false)` wrapping `Container(color: colorPalette.background3, ...)` — the header is the `appBar`, so the top inset is already handled; keep the bottom inset. The `background3` container gives the list/composer the correct surface color.
|
|
177
|
-
3. Mutable `_user`/`_group` — Keep mutable copies in State, not `widget.user`/`widget.group`. Update from SDK listeners for block/kick/scope changes.
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
## Pattern 3: Thread Screen
|
|
182
|
-
|
|
183
|
-
Thread replies pushed from `onThreadRepliesClick`. Same Scaffold rules apply.
|
|
184
|
-
|
|
185
57
|
```dart
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
final Group? group;
|
|
189
|
-
final BaseMessage message;
|
|
190
|
-
final CometChatMessageTemplate? template;
|
|
58
|
+
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
|
|
59
|
+
import 'package:flutter/material.dart';
|
|
191
60
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
required this.message, this.template,
|
|
195
|
-
});
|
|
61
|
+
class ChatsTab extends StatelessWidget {
|
|
62
|
+
const ChatsTab({super.key});
|
|
196
63
|
|
|
197
64
|
@override
|
|
198
65
|
Widget build(BuildContext context) {
|
|
199
|
-
final colorPalette = CometChatThemeHelper.getColorPalette(context);
|
|
200
66
|
return Scaffold(
|
|
201
|
-
|
|
202
|
-
appBar: CometChatMessageHeader(
|
|
203
|
-
user: user, group: group,
|
|
204
|
-
onBack: () => Navigator.pop(context),
|
|
205
|
-
),
|
|
67
|
+
appBar: AppBar(title: const Text('Chats')),
|
|
206
68
|
body: SafeArea(
|
|
207
|
-
child:
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
),
|
|
216
|
-
Expanded(
|
|
217
|
-
child: CometChatMessageList(
|
|
218
|
-
user: user, group: group,
|
|
219
|
-
parentMessageId: message.id,
|
|
220
|
-
// Scope the list to this thread only: exclude the parent and
|
|
221
|
-
// request just the replies for message.id.
|
|
222
|
-
withParent: false,
|
|
223
|
-
messagesRequestBuilder: MessagesRequestBuilder()
|
|
224
|
-
..parentMessageId = message.id,
|
|
225
|
-
hideReplyInThreadOption: true,
|
|
226
|
-
),
|
|
69
|
+
child: CometChatConversations(
|
|
70
|
+
hideAppbar: true, // the Scaffold already has one
|
|
71
|
+
onItemTap: (conversation) {
|
|
72
|
+
final entity = conversation.conversationWith;
|
|
73
|
+
Navigator.push(context, MaterialPageRoute(
|
|
74
|
+
builder: (_) => MessageScreen(
|
|
75
|
+
user: entity is User ? entity : null,
|
|
76
|
+
group: entity is Group ? entity : null,
|
|
227
77
|
),
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
parentMessageId: message.id,
|
|
231
|
-
),
|
|
232
|
-
],
|
|
233
|
-
),
|
|
78
|
+
));
|
|
79
|
+
},
|
|
234
80
|
),
|
|
235
81
|
),
|
|
236
82
|
);
|
|
237
83
|
}
|
|
238
84
|
}
|
|
239
85
|
```
|
|
86
|
+
> The Calls tab (`CometChatCallLogs`) comes from the **calls barrel** — that screen imports both barrels (`-calls`). Incoming-call presentation is handled by the kit itself; you don't mount an incoming widget at the root.
|
|
240
87
|
|
|
241
|
-
|
|
242
|
-
```dart
|
|
243
|
-
CometChatMessageList(
|
|
244
|
-
onThreadRepliesClick: (message, ctx, {template}) {
|
|
245
|
-
Navigator.push(context, MaterialPageRoute(
|
|
246
|
-
builder: (_) => ThreadScreen(
|
|
247
|
-
user: _user, group: _group,
|
|
248
|
-
message: message, template: template,
|
|
249
|
-
),
|
|
250
|
-
));
|
|
251
|
-
},
|
|
252
|
-
)
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## Pattern 4: Modal / Bottom Sheet Chat
|
|
88
|
+
**B. Chat tab inside an existing app.** Same as (A) but only the Chats tab: drop `CometChatConversations` into your existing tab scaffold. Keep the init/login gate at YOUR app root so chat is ready before the tab is first shown.
|
|
258
89
|
|
|
259
|
-
|
|
90
|
+
**C. Full-screen route.** `Navigator.pushNamed('/chat')` → a `Scaffold` holding the core surface. The simplest placement; nothing extra.
|
|
260
91
|
|
|
92
|
+
**D. Modal / bottom-sheet chat.** A sheet has no intrinsic height — give it one explicitly, or the list throws.
|
|
261
93
|
```dart
|
|
262
|
-
|
|
94
|
+
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
|
|
95
|
+
import 'package:flutter/material.dart';
|
|
96
|
+
|
|
97
|
+
void openChatSheet(BuildContext context, User user) {
|
|
263
98
|
showModalBottomSheet(
|
|
264
99
|
context: context,
|
|
265
|
-
isScrollControlled: true,
|
|
266
|
-
useSafeArea: true,
|
|
100
|
+
isScrollControlled: true, // REQUIRED: lets it exceed half-height
|
|
267
101
|
builder: (_) => SizedBox(
|
|
268
|
-
height: MediaQuery.
|
|
269
|
-
child:
|
|
270
|
-
|
|
271
|
-
appBar: CometChatMessageHeader(
|
|
272
|
-
user: user,
|
|
273
|
-
onBack: () => Navigator.pop(context),
|
|
274
|
-
),
|
|
275
|
-
body: Column(
|
|
102
|
+
height: MediaQuery.of(context).size.height * 0.9, // bounded — the kit fills it
|
|
103
|
+
child: SafeArea(
|
|
104
|
+
child: Column(
|
|
276
105
|
children: [
|
|
106
|
+
CometChatMessageHeader(user: user),
|
|
277
107
|
Expanded(child: CometChatMessageList(user: user)),
|
|
278
108
|
CometChatMessageComposer(user: user),
|
|
279
109
|
],
|
|
@@ -283,145 +113,28 @@ void _openChatModal(BuildContext context, User user) {
|
|
|
283
113
|
);
|
|
284
114
|
}
|
|
285
115
|
```
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
Expanded(flex: 3, child: YourProductPage()),
|
|
312
|
-
// Right: embedded chat
|
|
313
|
-
Expanded(
|
|
314
|
-
flex: 2,
|
|
315
|
-
child: Column(
|
|
316
|
-
children: [
|
|
317
|
-
CometChatMessageHeader(user: user),
|
|
318
|
-
Expanded(child: CometChatMessageList(user: user)),
|
|
319
|
-
CometChatMessageComposer(user: user),
|
|
320
|
-
],
|
|
321
|
-
),
|
|
322
|
-
),
|
|
323
|
-
],
|
|
324
|
-
),
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
---
|
|
331
|
-
|
|
332
|
-
## Pattern 6: Floating Action Button → Chat
|
|
333
|
-
|
|
334
|
-
```dart
|
|
335
|
-
Scaffold(
|
|
336
|
-
body: YourMainContent(),
|
|
337
|
-
floatingActionButton: FloatingActionButton(
|
|
338
|
-
onPressed: () => _openChatModal(context, supportUser),
|
|
339
|
-
child: const Icon(Icons.chat),
|
|
340
|
-
),
|
|
341
|
-
)
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
---
|
|
345
|
-
|
|
346
|
-
## Incoming Calls — Global Placement
|
|
347
|
-
|
|
348
|
-
Incoming call handling MUST be at the app root level, not per-screen. **`VoipCallHandler` does NOT exist as a public symbol** (it appears only in comments inside `call_event_service.dart` and `ongoing_call_bloc.dart`). The canonical V6 root-mount API is `CometChatUIKit.init` + `MaterialApp(navigatorKey: CallNavigationContext.navigatorKey)`:
|
|
349
|
-
|
|
350
|
-
```dart
|
|
351
|
-
import 'package:cometchat_chat_uikit/cometchat_calls_uikit.dart' show CallNavigationContext;
|
|
352
|
-
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
|
|
353
|
-
|
|
354
|
-
void main() async {
|
|
355
|
-
WidgetsFlutterBinding.ensureInitialized();
|
|
356
|
-
await CometChatUIKit.init(
|
|
357
|
-
uiKitSettings: (UIKitSettingsBuilder()
|
|
358
|
-
..appId = APP_ID
|
|
359
|
-
..region = REGION
|
|
360
|
-
..authKey = AUTH_KEY
|
|
361
|
-
..subscriptionType = CometChatSubscriptionType.allUsers
|
|
362
|
-
..enableCalls = true)
|
|
363
|
-
.build(),
|
|
364
|
-
);
|
|
365
|
-
runApp(MyApp());
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
class MyApp extends StatelessWidget {
|
|
369
|
-
@override
|
|
370
|
-
Widget build(BuildContext context) {
|
|
371
|
-
return MaterialApp(
|
|
372
|
-
navigatorKey: CallNavigationContext.navigatorKey, // ← Bug 1 fix per project_v6_flutter_calls_partial; even 6.0.1 sample omits this
|
|
373
|
-
home: HomeScreen(),
|
|
374
|
-
);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
See `cometchat-flutter-v6-calls` §1.7 for full root-mount details. CallEventService mounts `IncomingCallOverlay` automatically when `enableCalls=true`.
|
|
380
|
-
|
|
381
|
-
---
|
|
382
|
-
|
|
383
|
-
## Anti-Patterns
|
|
384
|
-
|
|
385
|
-
```dart
|
|
386
|
-
// ❌ WRONG — CometChatMessageList not wrapped in Expanded (unbounded → won't scroll)
|
|
387
|
-
Scaffold(
|
|
388
|
-
body: Column(children: [
|
|
389
|
-
CometChatMessageList(user: user), // needs Expanded inside a Column
|
|
390
|
-
CometChatMessageComposer(user: user),
|
|
391
|
-
]),
|
|
392
|
-
)
|
|
393
|
-
|
|
394
|
-
// ❌ WRONG — passing widget.user directly (stale after block/kick)
|
|
395
|
-
CometChatMessageList(user: widget.user)
|
|
396
|
-
|
|
397
|
-
// ❌ WRONG — incoming call handler only on messages screen
|
|
398
|
-
// Calls ring on ALL screens, not just the one with call buttons
|
|
399
|
-
|
|
400
|
-
// ❌ WRONG — navigating to messages without extracting user/group
|
|
401
|
-
onItemTap: (conv) => Navigator.push(context, MaterialPageRoute(
|
|
402
|
-
builder: (_) => MessagesScreen(conversation: conv), // Wrong!
|
|
403
|
-
))
|
|
404
|
-
|
|
405
|
-
// ✅ CORRECT — extract user/group from conversation
|
|
406
|
-
onItemTap: (conv) {
|
|
407
|
-
final user = conv.conversationWith is User ? conv.conversationWith as User : null;
|
|
408
|
-
final group = conv.conversationWith is Group ? conv.conversationWith as Group : null;
|
|
409
|
-
Navigator.push(context, MaterialPageRoute(
|
|
410
|
-
builder: (_) => MessagesScreen(user: user, group: group),
|
|
411
|
-
));
|
|
412
|
-
}
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
---
|
|
416
|
-
|
|
417
|
-
## Checklist
|
|
418
|
-
|
|
419
|
-
- [ ] `resizeToAvoidBottomInset: true` (or omitted — default) on Scaffolds with `CometChatMessageComposer`
|
|
420
|
-
- [ ] `SafeArea(top: false)` wrapping `Container(color: colorPalette.background3, ...)` for the message screen body
|
|
421
|
-
- [ ] Mutable `_user`/`_group` state copies, not `widget.user`/`widget.group`
|
|
422
|
-
- [ ] `onItemTap` extracts `User`/`Group` from `conversation.conversationWith`
|
|
423
|
-
- [ ] Protected groups handled (check `group.hasJoined` and `group.type`)
|
|
424
|
-
- [ ] Incoming call handler mounted at app root level
|
|
425
|
-
- [ ] Thread screen also uses `resizeToAvoidBottomInset: true`
|
|
426
|
-
- [ ] `hideAppbar: true` when parent provides its own AppBar
|
|
427
|
-
- [ ] `IndexedStack` used for tab-based home (preserves tab state)
|
|
116
|
+
> `isScrollControlled: true` + an explicit height are both required; without them the sheet caps at ~half screen and the composer fights the keyboard.
|
|
117
|
+
|
|
118
|
+
**E. Embedded panel (chat inside a bigger screen).** Give the region a fixed height or a sized flex cell — never let it sit inside an unbounded `SingleChildScrollView`/`Column`. If the host page scrolls, the chat needs its own `SizedBox(height: …)`.
|
|
119
|
+
|
|
120
|
+
## Choosing
|
|
121
|
+
| The ask | Placement |
|
|
122
|
+
|---|---|
|
|
123
|
+
| "add chat" (unscoped) | NOT here — core surface (`-core`) |
|
|
124
|
+
| "build the full chat app" | A — tab-based |
|
|
125
|
+
| "add a chat tab" | B |
|
|
126
|
+
| "a chat screen/page" | C |
|
|
127
|
+
| "popup / floating / sheet chat" | D |
|
|
128
|
+
| "chat inside my dashboard screen" | E |
|
|
129
|
+
|
|
130
|
+
## Common pitfalls (BAKED)
|
|
131
|
+
- **Over-delivering the tab app for a plain "add chat"** — that is the core surface, not this.
|
|
132
|
+
- **A list with no bounded height** — the most common Flutter failure (`layout.md`).
|
|
133
|
+
- **A bottom sheet without `isScrollControlled` + an explicit height.**
|
|
134
|
+
- **Two headers** — your `Scaffold` `AppBar` plus the widget's own; set `hideAppbar: true`.
|
|
135
|
+
- **Mounting `CometChatIncomingCall` yourself** — unnecessary and causes a double incoming-call screen. The kit presents the overlay automatically once calling is enabled; you only set `CallNavigationContext.navigatorKey` on your `MaterialApp` (`-calls`).
|
|
136
|
+
- **A pushed screen with no way back** (`navigation-round-trip`).
|
|
137
|
+
- **Re-running init/login per screen** instead of gating once at the root.
|
|
138
|
+
|
|
139
|
+
## Verify it works
|
|
140
|
+
Each placement renders full-size with no unbounded-height exception; item tap pushes and back pops; the composer stays above the keyboard; on the tab app an incoming call surfaces from every tab. Growing beyond this ⇒ `-calls` / `-features`.
|