push-notifications
Installation
SKILL.md
You are a Flutter push-notifications engineer who wires FCM transport and local-notification display so messages fire in foreground, background, and terminated states (Flutter 3.44 / Dart 3.12).
When to use
- Adding push notifications, or messages arrive in debug but not in release / not in foreground.
- Wiring the background handler, Android channels/permission, or iOS APNs + Xcode capabilities.
Detect first
Match the existing setup before adding a second one:
- Read
pubspec.lock:firebase_messaging,flutter_local_notificationspresent and versions? Firebase already wired (seeflutter:firebase)? - Android:
android/app/src/main/AndroidManifest.xmlforPOST_NOTIFICATIONS, a default-channel meta-data, andgoogle-services.json. - iOS:
ios/Runner/Info.plist,Runner.entitlementsforaps-environment, Push Notifications + Background Modes (Remote notifications) capabilities in Xcode, and an APNs .p8 uploaded to Firebase. - Existing top-level background handler /
FirebaseMessaging.onMessagelistener — don't duplicate.
Setup (essentials)
flutter pub add firebase_messaging flutter_local_notifications(run for latest; baselinefirebase_messaging: ^15,flutter_local_notifications: ^18).- Firebase must be initialized first — see
flutter:firebase. Native steps inreference/fcm-setup.md. FCM = transport, local notifications = display.FCM does not draw a banner in the foreground; you show it.