{"id":"843070e4-c7be-4d98-b4f3-3d5a10f8aa2f","shortId":"uxVcvB","kind":"skill","title":"cometchat-flutter-v6-push","tagline":"Push notifications for CometChat Flutter UIKit v6 (beta, Bloc-based). Covers firebase_messaging setup for FCM (Android) + APNs (iOS via Firebase), CometChat dashboard PushPlatform configuration, token registration via the Notifications SDK, background isolate handler (Dart entry-","description":"## Purpose\n\nPush notifications for Flutter v6 (beta). Notifies users on incoming messages when the app is backgrounded or terminated. Two components: **Firebase Messaging** (FCM on Android, APNs forwarded via Firebase on iOS) on the client, plus **CometChat dashboard PushPlatform** configured to forward CometChat's webhook to Firebase.\n\nThis skill is for **chat push** (new messages). Calls/VoIP push has different mechanics — see `cometchat-flutter-v6-calls/references/voip-push-end-to-end.md` (or the relevant section of `cometchat-flutter-v6-calls/SKILL.md` rule 1.2).\n\n**Read these other skills first:**\n- `cometchat-flutter-v6-core` — UIKitSettings, init/login order\n- `cometchat-flutter-v5-push` — sister skill (V5/GetX); same FCM stack with different client wiring\n- `cometchat-flutter-v6-calls` — calls VoIP push (overlap with this; both can coexist)\n\n**Ground truth:**\n- firebase_messaging — https://pub.dev/packages/firebase_messaging\n- CometChat docs — https://www.cometchat.com/docs/notifications/push-notifications\n- FCM data vs notification payloads — https://firebase.google.com/docs/cloud-messaging/concept-options\n\n---\n\n## 1. Architecture\n\n```\nFlutter app\n  ├── firebase_messaging — FCM token registration + receive\n  └── Background isolate handler — handles pushes when app is killed\n\nCometChat Notifications SDK (server-side, dashboard-managed)\n  ├── PushPlatform configured (FCM key for Android, APNs cert for iOS)\n  └── Listens for new-message events → fans out to FCM/APNs\n\nCometChat dashboard\n  └── Webhook → CometChat Notifications backend (no custom server needed for chat push)\n```\n\nUnlike Web Push (which requires you to run a push server), CometChat hosts the chat-push relay. Configure FCM/APNs creds in the dashboard's Notifications settings; CometChat does the rest.\n\n---\n\n## 2. Setup\n\n### Add packages\n\n```yaml\n# pubspec.yaml\ndependencies:\n  flutter:\n    sdk: flutter\n  cometchat_chat_uikit: ^6.0.0-beta2\n  firebase_messaging: ^14.0.0\n  firebase_core: ^2.0.0\n  flutter_local_notifications: ^16.0.0    # for foreground notifications + iOS in-app banner\n```\n\n### Firebase project setup\n\n```bash\nflutterfire configure\n```\n\nThis wizard:\n- Asks which Firebase project to use (or creates one)\n- Asks which platforms (iOS, Android, Web)\n- Generates `lib/firebase_options.dart`\n- Places `android/app/google-services.json`\n- Places `ios/Runner/GoogleService-Info.plist`\n\nIf you don't have FlutterFire CLI: `dart pub global activate flutterfire_cli`.\n\n### Android — `android/app/build.gradle`\n\n```gradle\napply plugin: 'com.google.gms.google-services'\n\nandroid {\n  defaultConfig {\n    minSdkVersion 26          // V6 floor; FCM needs 19+\n  }\n}\n```\n\nIn `android/build.gradle`:\n\n```gradle\nbuildscript {\n  dependencies {\n    classpath 'com.google.gms:google-services:4.4.0'\n  }\n}\n```\n\n### Android — manifest\n\n```xml\n<!-- android/app/src/main/AndroidManifest.xml -->\n<uses-permission android:name=\"android.permission.INTERNET\" />\n<uses-permission android:name=\"android.permission.POST_NOTIFICATIONS\" />     <!-- Android 13+ -->\n\n<application>\n  <meta-data\n    android:name=\"com.google.firebase.messaging.default_notification_channel_id\"\n    android:value=\"cometchat_messages\" />\n  <meta-data\n    android:name=\"com.google.firebase.messaging.default_notification_icon\"\n    android:resource=\"@drawable/ic_notification\" />\n</application>\n```\n\n### iOS — capabilities\n\nIn Xcode → target → Signing & Capabilities:\n- ☑ Push Notifications\n- ☑ Background Modes → Remote notifications\n\nThen upload an APNs Authentication Key (.p8) to **Firebase Console → Project Settings → Cloud Messaging → Apple app configuration**. Token-based auth (.p8) is preferred over cert-based — same key works for sandbox + production.\n\n---\n\n## 3. Initialize Firebase + register for push\n\n```dart\n// lib/main.dart\nimport 'package:firebase_core/firebase_core.dart';\nimport 'package:firebase_messaging/firebase_messaging.dart';\nimport 'firebase_options.dart';\n\nvoid main() async {\n  WidgetsFlutterBinding.ensureInitialized();\n  await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);\n\n  // CRITICAL: register the background handler BEFORE runApp\n  FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);\n\n  runApp(const MyApp());\n}\n\n// Background handler MUST be a top-level function (not a closure inside a class)\n// AND must be annotated with @pragma to survive tree-shaking in release builds\n@pragma('vm:entry-point')\nFuture<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {\n  // Runs in a SEPARATE isolate. No Bloc, no UI state — just data persistence\n  // or local notifications if needed.\n  await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);\n  // CometChat Notifications backend already shows the system notification;\n  // typically no extra work needed here.\n}\n```\n\n**The `@pragma('vm:entry-point')` annotation is non-negotiable.** Without it, Flutter's tree-shaking removes the function in release builds and the background handler silently fails.\n\n---\n\n## 4. Token registration with CometChat\n\nThe CometChat Notifications backend needs the device's FCM token to send pushes. Register it via the `CometChatNotifications` SDK after login resolves:\n\n```dart\n// lib/services/push_service.dart\nimport 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';\nimport 'package:firebase_messaging/firebase_messaging.dart';\nimport 'package:flutter/services.dart';\n\nclass PushService {\n  final FirebaseMessaging _fcm = FirebaseMessaging.instance;\n\n  /// Call AFTER CometChatUIKit.login resolves.\n  Future<void> registerForPush() async {\n    // Request permission (iOS prompts; Android 13+ prompts)\n    final settings = await _fcm.requestPermission(\n      alert: true,\n      badge: true,\n      sound: true,\n    );\n    if (settings.authorizationStatus != AuthorizationStatus.authorized) return;\n\n    // Get the FCM token\n    final token = await _fcm.getToken();\n    if (token == null) return;\n\n    // Register with CometChat — provider ID matches your dashboard PushPlatform\n    await _registerWithCometChat(token, platform: defaultTargetPlatform);\n\n    // Listen for token refresh — happens on OS upgrades, app reinstalls\n    _fcm.onTokenRefresh.listen((newToken) async {\n      await _registerWithCometChat(newToken, platform: defaultTargetPlatform);\n    });\n  }\n\n  Future<void> unregister() async {\n    final token = await _fcm.getToken();\n    if (token == null) return;\n    await _unregisterWithCometChat(token);\n  }\n\n  Future<void> _registerWithCometChat(String token, {required TargetPlatform platform}) async {\n    // Audit 2026-05-14: the canonical SDK method is `PNRegistry.registerPNService`,\n    // NOT `CometChatNotifications.registerPushToken` (which was cited in earlier\n    // drafts of this doc but doesn't exist on the installed SDK).\n    // Source: https://www.cometchat.com/docs/notifications/flutter-push-notifications-android.md\n    //\n    // The provider ID (FCM vs APN) is pulled from `AppCredentials.fcmProviderId`\n    // (or the APN equivalent) at registration time — you don't pass it directly.\n    PNRegistry.registerPNService(token, true, false);\n  }\n\n  Future<void> _unregisterWithCometChat(String token) async {\n    // Same `PNRegistry` namespace — pass `false` as the second arg to unregister.\n    PNRegistry.registerPNService(token, false, false);\n  }\n}\n```\n\n**Audit 2026-05-14** — the symbols are `PNRegistry.registerPNService(token, register, additionalFlag)`. Earlier drafts of this doc cited `CometChatNotifications.registerPushToken` / `unregisterPushToken` — those don't exist. Confirmed against the vendor docs at `https://www.cometchat.com/docs/notifications/flutter-push-notifications-android.md`. If you've copied the old symbols into your code, they will not compile.\n\n---\n\n## 5. Wire into the auth flow\n\n```dart\n// lib/main.dart (continued)\nclass MyApp extends StatefulWidget {\n  @override\n  State<MyApp> createState() => _MyAppState();\n}\n\nclass _MyAppState extends State<MyApp> {\n  final PushService _push = PushService();\n\n  @override\n  void initState() {\n    super.initState();\n    _initCometChat();\n  }\n\n  Future<void> _initCometChat() async {\n    final settings = (UIKitSettings.builder()\n      ..appId = CometChatConfig.appId\n      ..region = CometChatConfig.region\n      ..authKey = CometChatConfig.authKey)\n      .build();\n\n    CometChatUIKit.init(\n      uiKitSettings: settings,\n      onSuccess: (_) async {\n        // After login (in your AuthBloc or wherever)\n        await _push.registerForPush();\n        _setupForegroundHandler();\n        _setupNotificationTapHandler();\n      },\n    );\n  }\n\n  void _setupForegroundHandler() {\n    FirebaseMessaging.onMessage.listen((RemoteMessage message) {\n      // App is in foreground — system doesn't show a notification automatically.\n      // Either show a flutter_local_notifications banner, or surface in-app via Bloc.\n    });\n  }\n\n  void _setupNotificationTapHandler() {\n    // Tap on notification while app is backgrounded\n    FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {\n      _navigateToConversation(message);\n    });\n\n    // Cold-start tap — app was terminated, user tapped notification\n    FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage? message) {\n      if (message != null) _navigateToConversation(message);\n    });\n  }\n\n  void _navigateToConversation(RemoteMessage message) {\n    final data = message.data;\n    final conversationId = data['conversationId'] as String?;\n    final receiverType = data['receiverType'] as String?;\n    if (conversationId == null) return;\n\n    // Use a global navigator key (set on MaterialApp.navigatorKey) to navigate\n    // from outside the widget tree\n    AppNavigator.navigatorKey.currentState?.pushNamed(\n      receiverType == 'group' ? '/messages/group/$conversationId' : '/messages/user/$conversationId',\n    );\n  }\n}\n```\n\n---\n\n## 6. CometChat dashboard PushPlatform\n\nIn the dashboard:\n\n1. Navigate to **Notifications → Push Notifications**.\n2. Add provider:\n   - **FCM** for Android: paste the FCM Server Key (from Firebase Console → Project Settings → Cloud Messaging → Cloud Messaging API (Legacy)) OR the new HTTP v1 API service account JSON\n   - **APN** for iOS: paste the .p8 + Team ID + Key ID, OR the .p12 (legacy)\n3. Save. CometChat now relays new-message events to FCM/APNs.\n\n**Use HTTP v1 API for FCM** — Google deprecated the legacy server keys. The dashboard's UI lists both; pick HTTP v1 for new setups.\n\n---\n\n## 7. Foreground notifications\n\nWhen the app is foregrounded, FCM does NOT show a system notification — `onMessage` fires instead and you decide what to do. Options:\n\n### A — In-app banner via Bloc\n\n```dart\n// In your AppBloc or a NotificationBloc\non<IncomingMessageNotification>((event, emit) {\n  emit(state.copyWith(banner: BannerData(\n    title: event.senderName,\n    body: event.preview,\n    onTap: () => navigatorKey.currentState?.pushNamed(...),\n  )));\n});\n```\n\nRender the banner in `MaterialApp.builder`.\n\n### B — Local notification via flutter_local_notifications\n\n```dart\nimport 'package:flutter_local_notifications/flutter_local_notifications.dart';\n\nfinal FlutterLocalNotificationsPlugin _localNotifs = FlutterLocalNotificationsPlugin();\n\nFuture<void> _showLocalNotif(RemoteMessage message) async {\n  await _localNotifs.show(\n    message.hashCode,\n    message.notification?.title ?? '',\n    message.notification?.body ?? '',\n    NotificationDetails(\n      android: AndroidNotificationDetails(\n        'cometchat_messages',\n        'Messages',\n        importance: Importance.high,\n        priority: Priority.high,\n      ),\n      iOS: DarwinNotificationDetails(),\n    ),\n    payload: jsonEncode(message.data),\n  );\n}\n```\n\nInitialize `flutter_local_notifications` once in `main()`:\n\n```dart\nawait _localNotifs.initialize(\n  InitializationSettings(\n    android: AndroidInitializationSettings('@mipmap/ic_launcher'),\n    iOS: DarwinInitializationSettings(),\n  ),\n  onDidReceiveNotificationResponse: (response) {\n    if (response.payload != null) {\n      final data = jsonDecode(response.payload!);\n      // navigate\n    }\n  },\n);\n```\n\n---\n\n## 8. Logout cleanup\n\n```dart\nclass AuthBloc extends Bloc<AuthEvent, AuthState> {\n  final PushService _push;\n\n  on<LogoutRequested>((event, emit) async {\n    await _push.unregister();             // CRITICAL — before SDK logout\n    await CometChatUIKit.logout(/* ... */);\n    emit(Unauthenticated());\n  });\n}\n```\n\nIf you skip unregister, the previous user keeps getting notifications for the new user's messages.\n\n---\n\n## 9. v5 → v6 push migration\n\nIf migrating from v5:\n\n| Concern | V5 | V6 |\n|---|---|---|\n| Listener pattern | GetX `Get.put` for push handlers | Bloc — handlers in app shell or a NotificationBloc |\n| Init lifecycle | `CometChatUIKit.init` callback | Same shape — `onSuccess` / `onError` |\n| Token registration API | Verify against installed `cometchat_chat_uikit` | Same — likely renamed; verify |\n| Background handler | `@pragma('vm:entry-point')` required | Unchanged — Flutter framework requirement |\n| Calls VoIP push interaction | `cometchat_calls_uikit ^5` separate package | Calls bundled into `cometchat_chat_uikit ^6.0.0-beta2`; VoIP push handled in `cometchat-flutter-v6-calls` references |\n\nThe migration is small for push specifically — the FCM/firebase_messaging stack is unchanged; the deltas are in the surrounding architecture.\n\n---\n\n## 10. Anti-patterns\n\n1. **Background handler missing `@pragma('vm:entry-point')`.** Tree-shaken in release builds; works in debug. The \"works in dev, fails in production\" canary.\n2. **Background handler as a closure inside a class.** Must be a TOP-LEVEL function. Closures can't be passed across isolate boundaries.\n3. **Calling `_push.registerForPush()` before login.** CometChat doesn't know whose UID this token belongs to. Register from the post-login success callback.\n4. **Skipping `onTokenRefresh`.** OS upgrades and app reinstalls rotate the FCM token without warning. Listen to refresh and re-register.\n5. **Using FCM legacy server keys.** Google deprecated them. Use HTTP v1 API service account in CometChat dashboard.\n6. **Not unregistering on logout.** Previous user's notifications keep arriving for the new session.\n7. **Showing a foreground notification AND an in-app banner for the same message.** Pick one. The skill defaults to in-app banner (Bloc-driven) if the chat tab is active; system notification otherwise.\n8. **`flutter_local_notifications` initialization missing icon resource.** Crashes on Android with \"Notification icon not found.\" Drop a `ic_notification.png` in `android/app/src/main/res/drawable/`.\n\n---\n\n## 11. Verification checklist\n\n- [ ] `firebase_messaging ^14.0.0` + `firebase_core ^2.0.0` in pubspec.yaml\n- [ ] `flutterfire configure` ran successfully; `lib/firebase_options.dart` exists\n- [ ] `google-services.json` in `android/app/`\n- [ ] `GoogleService-Info.plist` in `ios/Runner/`\n- [ ] iOS: Push Notifications + Remote-notification background mode capabilities enabled\n- [ ] iOS: APNs .p8 key uploaded to Firebase Console\n- [ ] Android: `minSdkVersion 26` in `android/app/build.gradle` (V6 floor)\n- [ ] Android manifest: `POST_NOTIFICATIONS` permission + notification channel meta-data\n- [ ] Background handler is top-level + `@pragma('vm:entry-point')`\n- [ ] Background handler initialized via `FirebaseMessaging.onBackgroundMessage` BEFORE `runApp`\n- [ ] FCM/APN token registered with CometChat via `PNRegistry.registerPNService(token, true, false)` AFTER login (NOT `CometChatNotifications.registerPushToken` — that symbol doesn't exist; audit 2026-05-14)\n- [ ] `onTokenRefresh` re-registers\n- [ ] Foreground handler decides banner vs no-banner based on chat tab focus\n- [ ] `onMessageOpenedApp` + `getInitialMessage` both navigate to the conversation\n- [ ] Logout calls `_push.unregister()` BEFORE `CometChatUIKit.logout()`\n- [ ] Dashboard PushPlatform configured with FCM HTTP v1 + APNs .p8\n- [ ] Real-device smoke (NOT simulator): backgrounded app → message → notification rings + tapping opens chat thread\n\n---\n\n## 12. Pointers\n\n- `cometchat-flutter-v5-push` — V5/GetX sister skill (FCM stack unchanged; client wiring different)\n- `cometchat-flutter-v6-calls/references/voip-push-end-to-end.md` — calls VoIP push (overlap; both can coexist)\n- `cometchat-flutter-v6-core` — UIKitSettings, init/login order\n- `cometchat-flutter-v6-troubleshooting` — push debugging (token never registers, background handler doesn't fire, FCM payload not received)\n- `cometchat-flutter-v6-migration` — full V5→V6 migration recipe; push delta is one section","tags":["cometchat","flutter","push","skills","agent-skills","ai-agent","chat","claude-code","cursor","messaging","nextjs","react"],"capabilities":["skill","source-cometchat","skill-cometchat-flutter-v6-push","topic-agent-skills","topic-ai-agent","topic-chat","topic-claude-code","topic-cometchat","topic-cursor","topic-messaging","topic-nextjs","topic-react","topic-react-native","topic-ui-kit"],"categories":["cometchat-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/cometchat/cometchat-skills/cometchat-flutter-v6-push","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add cometchat/cometchat-skills","source_repo":"https://github.com/cometchat/cometchat-skills","install_from":"skills.sh"}},"qualityScore":"0.463","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 27 github stars · SKILL.md body (16,593 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:04:52.058Z","embedding":null,"createdAt":"2026-05-18T07:04:24.731Z","updatedAt":"2026-05-18T19:04:52.058Z","lastSeenAt":"2026-05-18T19:04:52.058Z","tsv":"'-05':715,795,1664 '-14':716,796,1665 '/docs/cloud-messaging/concept-options':184 '/docs/notifications/flutter-push-notifications-android.md':745,824 '/docs/notifications/push-notifications':176 '/messages/group':1003 '/messages/user':1005 '/packages/firebase_messaging':171 '/references/voip-push-end-to-end.md':109,1740 '/skill.md':120 '1':185,1014,1382 '1.2':122 '10':1378 '11':1567 '12':1719 '13':631 '14.0.0':294,1572 '16.0.0':301 '19':367 '2':277,1020,1408 '2.0.0':297,1575 '2026':714,794,1663 '26':362,1610 '3':429,1065,1432 '4':572,1455 '4.4.0':378 '5':839,1338,1476 '6':1007,1494 '6.0.0':290,1347 '7':1100,1509 '8':1228,1546 '9':1271 'account':1049,1490 'across':1429 'activ':349,1542 'add':279,1021 'additionalflag':803 'alert':637 'alreadi':531 'android':23,68,218,331,352,359,379,630,1025,1188,1213,1556,1608,1615 'android/app':1586 'android/app/build.gradle':353,1612 'android/app/google-services.json':336 'android/app/src/main/res/drawable':1566 'android/build.gradle':369 'androidinitializationset':1214 'androidnotificationdetail':1189 'annot':485,548 'anti':1380 'anti-pattern':1379 'api':1040,1047,1079,1308,1488 'apn':24,69,219,398,751,758,1051,1601,1702 'app':57,188,201,308,410,681,903,925,934,946,1105,1128,1293,1461,1518,1532,1711 'appbloc':1135 'appcredentials.fcmproviderid':755 'appid':875 'appl':409 'appli':355 'appnavigator.navigatorkey.currentstate':999 'architectur':186,1377 'arg':786 'arriv':1504 'ask':318,327 'async':449,505,625,685,693,712,777,871,886,1179,1244 'audit':713,793,1662 'auth':415,843 'authbloc':891,1233 'authent':399 'authev':1236 'authkey':879 'authorizationstatus.authorized':645 'authstat':1237 'automat':913 'await':451,524,635,653,668,686,696,702,894,1180,1210,1245,1251 'b':1158 'backend':238,530,580 'background':38,59,195,391,458,467,568,936,1319,1383,1409,1596,1625,1636,1710,1766 'badg':639 'banner':309,920,1129,1144,1155,1519,1533,1673,1677 'bannerdata':1145 'base':16,414,422,1678 'bash':313 'belong':1445 'beta':13,49 'beta2':291,1348 'bloc':15,512,927,1131,1235,1290,1535 'bloc-bas':14 'bloc-driven':1534 'bodi':1148,1186 'boundari':1431 'build':495,565,881,1396 'buildscript':371 'bundl':1342 'call':108,119,155,156,619,1331,1336,1341,1357,1433,1691,1739,1741 'callback':1301,1454 'calls/voip':98 'canari':1407 'canon':718 'capabl':383,388,1598 'cert':220,421 'cert-bas':420 'channel':1621 'chat':94,244,261,288,604,1313,1345,1539,1680,1717 'chat-push':260 'checklist':1569 'cite':727,809 'class':481,613,848,856,1232,1416 'classpath':373 'cleanup':1230 'cli':345,351 'client':77,149,1732 'closur':478,1413,1424 'cloud':407,1036,1038 'code':834 'coexist':164,1747 'cold':943 'cold-start':942 'com.google.gms':374 'com.google.gms.google':357 'cometchat':2,9,28,79,85,105,116,129,137,152,172,204,233,236,257,273,287,528,576,578,603,661,1008,1067,1190,1312,1335,1344,1354,1437,1492,1647,1722,1736,1749,1757,1776 'cometchat-flutter-v5-push':136,1721 'cometchat-flutter-v6-calls':104,115,151,1353,1735 'cometchat-flutter-v6-core':128,1748 'cometchat-flutter-v6-migration':1775 'cometchat-flutter-v6-push':1 'cometchat-flutter-v6-troubleshooting':1756 'cometchatconfig.appid':876 'cometchatconfig.authkey':880 'cometchatconfig.region':878 'cometchatnotif':594 'cometchatnotifications.registerpushtoken':724,810,1656 'cometchatuikit.init':882,1300 'cometchatuikit.login':621 'cometchatuikit.logout':1252,1694 'compil':838 'compon':63 'concern':1280 'configur':31,82,214,264,315,411,1579,1697 'confirm':816 'consol':404,1033,1607 'const':465 'continu':847 'convers':1689 'conversationid':969,971,981,1004,1006 'copi':828 'core':132,296,1574,1752 'core/firebase_core.dart':440 'cover':17 'crash':1554 'creat':325 'createst':854 'cred':266 'critic':455,1247 'custom':240 'dart':41,346,435,599,845,1132,1165,1209,1231 'darwininitializationset':1217 'darwinnotificationdetail':1198 'dashboard':29,80,211,234,269,666,1009,1013,1089,1493,1695 'dashboard-manag':210 'data':178,517,966,970,976,1224,1624 'debug':1399,1762 'decid':1120,1672 'default':1528 'defaultconfig':360 'defaultfirebaseoptions.currentplatform':454,527 'defaulttargetplatform':672,690 'delta':1372,1786 'depend':283,372 'deprec':1083,1483 'dev':1403 'devic':583,1706 'differ':101,148,1734 'direct':768 'doc':173,733,808,820 'doesn':735,908,1438,1659,1768 'draft':730,805 'driven':1536 'drop':1562 'earlier':729,804 'either':914 'emit':1141,1142,1243,1253 'enabl':1599 'entri':42,499,546,1324,1389,1634 'entry-point':498,545,1323,1388,1633 'equival':759 'event':228,1073,1140,1242 'event.preview':1149 'event.sendername':1147 'exist':737,815,1583,1661 'extend':850,858,1234 'extra':538 'fail':571,1404 'fals':772,782,791,792,1652 'fan':229 'fcm':22,66,145,177,191,215,365,585,617,649,749,1023,1028,1081,1108,1465,1478,1699,1729,1771 'fcm.gettoken':654,697 'fcm.ontokenrefresh.listen':683 'fcm.requestpermission':636 'fcm/apn':1643 'fcm/apns':232,265,1075 'fcm/firebase_messaging':1367 'final':615,633,651,694,860,872,965,968,974,1171,1223,1238 'fire':1116,1770 'firebas':18,27,64,72,89,167,189,292,295,310,320,403,431,439,443,608,1032,1570,1573,1606 'firebase.google.com':183 'firebase.google.com/docs/cloud-messaging/concept-options':182 'firebase.initializeapp':452,525 'firebase_options.dart':446 'firebasemessag':616 'firebasemessaging.instance':618 'firebasemessaging.instance.getinitialmessage':952 'firebasemessaging.onbackgroundmessage':462,1640 'firebasemessaging.onmessage.listen':900 'firebasemessaging.onmessageopenedapp.listen':937 'firebasemessagingbackgroundhandl':463,502 'first':127 'floor':364,1614 'flow':844 'flutter':3,10,47,106,117,130,138,153,187,284,286,298,555,917,1162,1168,1203,1328,1355,1547,1723,1737,1750,1758,1777 'flutter/services.dart':612 'flutterfir':314,344,350,1578 'flutterlocalnotificationsplugin':1172,1174 'focus':1682 'foreground':303,906,1101,1107,1512,1670 'forward':70,84 'found':1561 'framework':1329 'full':1780 'function':475,562,1423 'futur':501,623,691,705,773,869,1175 'generat':333 'get':647,1263 'get.put':1286 'getinitialmessag':1684 'getx':1285 'global':348,986 'googl':376,1082,1482 'google-servic':375 'google-services.json':1584 'googleservice-info.plist':1587 'gradl':354,370 'ground':165 'group':1002 'handl':198,1351 'handler':40,197,459,468,569,1289,1291,1320,1384,1410,1626,1637,1671,1767 'happen':677 'host':258 'http':1045,1077,1095,1486,1700 'ic_notification.png':1564 'icon':1552,1559 'id':663,748,1058,1060 'import':437,441,445,601,606,610,1166,1193 'importance.high':1194 'in-app':306,923,1126,1516,1530 'incom':53 'init':1298 'init/login':134,1754 'initcometchat':868,870 'initi':430,1202,1550,1638 'initializationset':1212 'initst':866 'insid':479,1414 'instal':740,1311 'instead':1117 'interact':1334 'io':25,74,222,305,330,382,628,1053,1197,1216,1590,1600 'ios/runner':1589 'ios/runner/googleservice-info.plist':338 'isol':39,196,510,1430 'json':1050 'jsondecod':1225 'jsonencod':1200 'keep':1262,1503 'key':216,400,424,988,1030,1059,1087,1481,1603 'kill':203 'know':1440 'legaci':1041,1064,1085,1479 'level':474,1422,1630 'lib/firebase_options.dart':334,1582 'lib/main.dart':436,846 'lib/services/push_service.dart':600 'lifecycl':1299 'like':1316 'list':1092 'listen':223,673,1283,1469 'local':299,520,918,1159,1163,1169,1204,1548 'localnotif':1173 'localnotifs.initialize':1211 'localnotifs.show':1181 'login':597,888,1436,1452,1654 'logout':1229,1250,1498,1690 'main':448,1208 'manag':212 'manifest':380,1616 'match':664 'materialapp.builder':1157 'materialapp.navigatorkey':991 'mechan':102 'messag':19,54,65,97,168,190,227,293,408,504,902,939,941,955,957,960,964,1037,1039,1072,1178,1191,1192,1270,1523,1571,1712 'message.data':967,1201 'message.hashcode':1182 'message.notification':1183,1185 'messaging/firebase_messaging.dart':444,609 'meta':1623 'meta-data':1622 'method':720 'migrat':1275,1277,1360,1779,1783 'minsdkvers':361,1609 'mipmap/ic_launcher':1215 'miss':1385,1551 'mode':392,1597 'must':469,483,1417 'myapp':466,849 'myappstat':855,857 'namespac':780 'navig':987,993,1015,1227,1686 'navigatetoconvers':940,959,962 'navigatorkey.currentstate':1151 'need':242,366,523,540,581 'negoti':552 'never':1764 'new':96,226,1044,1071,1098,1267,1507 'new-messag':225,1070 'newtoken':684,688 'no-bann':1675 'non':551 'non-negoti':550 'notif':7,36,45,180,205,237,271,300,304,390,394,521,529,535,579,912,919,932,951,1017,1019,1102,1114,1160,1164,1205,1264,1502,1513,1544,1549,1558,1592,1595,1618,1620,1713 'notifi':50 'notificationbloc':1138,1297 'notificationdetail':1187 'notifications/flutter_local_notifications.dart':1170 'null':657,700,958,982,1222 'old':830 'ondidreceivenotificationrespons':1218 'one':326,1525,1788 'onerror':1305 'onmessag':1115 'onmessageopenedapp':1683 'onsuccess':885,1304 'ontap':1150 'ontokenrefresh':1457,1666 'open':1716 'option':453,526,1124 'order':135,1755 'os':679,1458 'otherwis':1545 'outsid':995 'overlap':159,1744 'overrid':852,864 'p12':1063 'p8':401,416,1056,1602,1703 'packag':280,438,442,602,607,611,1167,1340 'pass':766,781,1428 'past':1026,1054 'pattern':1284,1381 'payload':181,1199,1772 'permiss':627,1619 'persist':518 'pick':1094,1524 'place':335,337 'platform':329,671,689,711 'plugin':356 'plus':78 'pnregistri':779 'pnregistry.registerpnservice':722,769,789,800,1649 'point':500,547,1325,1390,1635 'pointer':1720 'post':1451,1617 'post-login':1450 'pragma':487,496,543,1321,1386,1631 'prefer':418 'previous':1260,1499 'prioriti':1195 'priority.high':1196 'product':428,1406 'project':311,321,405,1034 'prompt':629,632 'provid':662,747,1022 'pub':347 'pub.dev':170 'pub.dev/packages/firebase_messaging':169 'pubspec.yaml':282,1577 'pull':753 'purpos':43 'push':5,6,44,95,99,140,158,199,245,248,255,262,389,434,589,862,1018,1240,1274,1288,1333,1350,1364,1591,1725,1743,1761,1785 'push.registerforpush':895,1434 'push.unregister':1246,1692 'pushnam':1000,1152 'pushplatform':30,81,213,667,1010,1696 'pushservic':614,861,863,1239 'ran':1580 're':1474,1668 're-regist':1473,1667 'read':123 'real':1705 'real-devic':1704 'receiv':194,1774 'receivertyp':975,977,1001 'recip':1784 'refer':1358 'refresh':676,1471 'region':877 'regist':432,456,590,659,802,1447,1475,1645,1669,1765 'registerforpush':624 'registerwithcometchat':669,687,706 'registr':33,193,574,761,1307 'reinstal':682,1462 'relay':263,1069 'releas':494,564,1395 'relev':112 'remot':393,1594 'remote-notif':1593 'remotemessag':503,901,938,954,963,1177 'remov':560 'renam':1317 'render':1153 'request':626 'requir':250,709,1326,1330 'resolv':598,622 'resourc':1553 'respons':1219 'response.payload':1221,1226 'rest':276 'return':646,658,701,983 'ring':1714 'rotat':1463 'rule':121 'run':253,506 'runapp':461,464,1642 'sandbox':427 'save':1066 'sdk':37,206,285,595,719,741,1249 'second':785 'section':113,1789 'see':103 'send':588 'separ':509,1339 'server':208,241,256,1029,1086,1480 'server-sid':207 'servic':358,377,1048,1489 'session':1508 'set':272,406,634,873,884,989,1035 'settings.authorizationstatus':644 'setup':20,278,312,1099 'setupforegroundhandl':896,899 'setupnotificationtaphandl':897,929 'shake':492,559 'shaken':1393 'shape':1303 'shell':1294 'show':532,910,915,1111,1510 'showlocalnotif':1176 'side':209 'sign':387 'silent':570 'simul':1709 'sister':141,1727 'skill':91,126,142,1527,1728 'skill-cometchat-flutter-v6-push' 'skip':1257,1456 'small':1362 'smoke':1707 'sound':641 'sourc':742 'source-cometchat' 'specif':1365 'stack':146,1368,1730 'start':944 'state':515,853,859 'state.copywith':1143 'statefulwidget':851 'string':707,775,973,979 'success':1453,1581 'super.initstate':867 'surfac':922 'surround':1376 'surviv':489 'symbol':798,831,1658 'system':534,907,1113,1543 'tab':1540,1681 'tap':930,945,950,1715 'target':386 'targetplatform':710 'team':1057 'termin':61,948 'thread':1718 'time':762 'titl':1146,1184 'token':32,192,413,573,586,650,652,656,670,675,695,699,704,708,770,776,790,801,1306,1444,1466,1644,1650,1763 'token-bas':412 'top':473,1421,1629 'top-level':472,1420,1628 'topic-agent-skills' 'topic-ai-agent' 'topic-chat' 'topic-claude-code' 'topic-cometchat' 'topic-cursor' 'topic-messaging' 'topic-nextjs' 'topic-react' 'topic-react-native' 'topic-ui-kit' 'tree':491,558,998,1392 'tree-shak':490,557 'tree-shaken':1391 'troubleshoot':1760 'true':638,640,642,771,1651 'truth':166 'two':62 'typic':536 'ui':514,1091 'uid':1442 'uikit':11,289,1314,1337,1346 'uikit/cometchat_chat_uikit.dart':605 'uikitset':133,883,1753 'uikitsettings.builder':874 'unauthent':1254 'unchang':1327,1370,1731 'unlik':246 'unregist':692,788,1258,1496 'unregisterpushtoken':811 'unregisterwithcometchat':703,774 'upgrad':680,1459 'upload':396,1604 'use':323,984,1076,1477,1485 'user':51,949,1261,1268,1500 'v1':1046,1078,1096,1487,1701 'v5':139,1272,1279,1281,1724,1781 'v5/getx':143,1726 'v6':4,12,48,107,118,131,154,363,1273,1282,1356,1613,1738,1751,1759,1778,1782 've':827 'vendor':819 'verif':1568 'verifi':1309,1318 'via':26,34,71,592,926,1130,1161,1639,1648 'vm':497,544,1322,1387,1632 'void':447,865,898,928,961 'voip':157,1332,1349,1742 'vs':179,750,1674 'warn':1468 'web':247,332 'webhook':87,235 'wherev':893 'whose':1441 'widget':997 'widgetsflutterbinding.ensureinitialized':450 'wire':150,840,1733 'without':553,1467 'wizard':317 'work':425,539,1397,1401 'www.cometchat.com':175,744,823 'www.cometchat.com/docs/notifications/flutter-push-notifications-android.md':743,822 'www.cometchat.com/docs/notifications/push-notifications':174 'xcode':385 'xml':381 'yaml':281","prices":[{"id":"180fc7dd-18de-48b8-aa68-4078fb3b2f3e","listingId":"843070e4-c7be-4d98-b4f3-3d5a10f8aa2f","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"cometchat","category":"cometchat-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T07:04:24.731Z"}],"sources":[{"listingId":"843070e4-c7be-4d98-b4f3-3d5a10f8aa2f","source":"github","sourceId":"cometchat/cometchat-skills/cometchat-flutter-v6-push","sourceUrl":"https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-flutter-v6-push","isPrimary":false,"firstSeenAt":"2026-05-18T07:04:24.731Z","lastSeenAt":"2026-05-18T19:04:52.058Z"}],"details":{"listingId":"843070e4-c7be-4d98-b4f3-3d5a10f8aa2f","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"cometchat","slug":"cometchat-flutter-v6-push","github":{"repo":"cometchat/cometchat-skills","stars":27,"topics":["agent-skills","ai-agent","chat","claude-code","cometchat","cursor","messaging","nextjs","react","react-native","ui-kit"],"license":null,"html_url":"https://github.com/cometchat/cometchat-skills","pushed_at":"2026-05-18T05:04:24Z","description":"Add CometChat chat to any React, Next.js, React Native, Angular, Android, iOS, or Flutter project through your AI coding agent. Works with Claude Code, Cursor, Codex, VS Code Copilot, Windsurf, Cline, Kiro, and 50+ more agents.","skill_md_sha":"127c97a7c632b83e5d0b9f076986f85c806cd85d","skill_md_path":"skills/cometchat-flutter-v6-push/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-flutter-v6-push"},"layout":"multi","source":"github","category":"cometchat-skills","frontmatter":{"name":"cometchat-flutter-v6-push","license":"MIT","description":"Push notifications for CometChat Flutter UIKit v6 (beta, Bloc-based). Covers firebase_messaging setup for FCM (Android) + APNs (iOS via Firebase), CometChat dashboard PushPlatform configuration, token registration via the Notifications SDK, background isolate handler (Dart entry-point rule), foreground vs background message routing, notification tap deep-link to chat threads, and the Bloc patterns for surfacing push state. Sister skill of cometchat-flutter-v5-push — same FCM stack, Bloc-flavored client integration.","compatibility":"Flutter >= 2.5, Dart >= 3.0; cometchat_chat_uikit ^6.0.0-beta2; firebase_messaging ^14.0.0; firebase_core ^2.0.0; Android minSdk 26+; iOS 13+ deployment target"},"skills_sh_url":"https://skills.sh/cometchat/cometchat-skills/cometchat-flutter-v6-push"},"updatedAt":"2026-05-18T19:04:52.058Z"}}