Push notifications for Flutter
Push notifications with deep-link routing
The push skill covers the full client-side path: permission opt-in, FCM token sync, foreground display and routing the user to the right screen on tap.
What this feature covers
- Transport: Firebase Cloud Messaging on Android and APNs via FCM on iOS.
- Permission flow: A lazy opt-in that asks only when the app needs it.
- Token sync: The device token synced to your backend and cleaned up on sign-out.
- Foreground display: Local notifications so foreground messages are visible on Android.
- Tap routing: Deep-link routing to the right screen when a notification is tapped.
How Flutter Agent Kit implements it
A NotificationService handles setup and token sync, a NotificationTapBus carries a tap payload to the router, and permissions go through firebase_messaging.requestPermission() rather than a separate permission plugin. Firebase is wired with the FlutterFire CLI, which generates firebase_options.dart and the native config files.
The skill is built on patterns from shipped apps and fixes two bugs found in the wild: release builds pinned to the development APNs environment, and a stale token left on the backend after logout. It covers Android and iOS.
Frequently asked questions
Do I need a backend to send push notifications?
Yes, to send them. The skill covers the client side: receiving FCM payloads, syncing the device token to your backend and routing on tap. The sending logic and campaign tooling live in your backend or a service like the Firebase console.
How are foreground notifications handled on Android?
FCM does not auto-display a banner when the app is in the foreground on Android, so the kit posts a local notification manually. On iOS, foreground display is handled in AppDelegate, so the local-notifications plugin is effectively Android-only at runtime.
Get Flutter Agent Kit
Flutter Agent Kit ships this as a ready feature skill, together with the AGENTS.md context layer and the rest of the skills. €99.99 one-time, lifetime updates, unlimited personal and commercial projects.
Browse all features included in Flutter Agent Kit.