Skip to content
pubscout

fcm_actions

1.0.3, released 5 weeks ago by an unverified publisher

Production-ready FCM actions, tokens, topics, and routing for Flutter apps.

WASM-ready
$ flutter pub add fcm_actions
Source repository

What it does

Normalizes Firebase Cloud Messaging payloads, manages tokens and topics, handles action buttons, inline replies, and background tasks, and provides typed event streams and route mapping.

AI-written summary of version 1.0.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need robust action buttons, inline replies, and deep linking for Firebase Cloud Messaging.
  • You want centralized routing and middleware for notification events across multiple platforms.

Skip it when

  • You only require basic local notifications without Firebase Cloud Messaging.
  • You are using a push provider other than FCM.

Strengths

  • Handles complex notification flows including background actions and inline replies out of the box.
  • Supports Android, iOS, macOS, and web with WASM compatibility.
  • Includes built-in replay protection, payload size limits, and persistent retries.

Weaknesses

  • Requires native configuration steps such as APNs entitlements on iOS and Java desugaring on Android.
  • Topics are not supported on the web platform.

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
Yes (build_runner)
Direct dependencies
9

Requires running flutterfire configure, enabling Push Notifications and Background Modes in Xcode for iOS, and adding core-library desugaring dependencies for Android.

final result = await FcmActions.initialize(
  navigatorKey: navigatorKey,
  actions: const [
    NotificationAction(id: 'accept', title: 'Accept'),
    NotificationAction(id: 'decline', title: 'Decline', destructive: true),
  ],
  routes: const [
    RouteMapper(type: 'chat', route: '/chat'),
  ],
  onAction: (event, data) async {
    debugPrint('${event.actionId}: $data');
  },
);

Alternatives

Packages that do the same job and could replace fcm_actions.

Works with

Packages commonly used together with fcm_actions: ones it builds on, ones built on it, and its own family.