Skip to content
pubscout

fcm_config

3.6.5, released 2 years ago by new-step-apps.com

Merges firebase_messaging and flutter_local_notifications for handling FCM notifications.

$ flutter pub add fcm_config
Source repository

What it does

Merges the firebase_messaging package and flutter_local_notifications to make handling, displaying, and interacting with FCM notifications easier. It provides widgets and mixins to listen to incoming notifications and notification taps, as well as handling background messages.

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

Use it when

  • You want to display FCM notifications while the app is in the foreground using local notifications.
  • You need an easier way to handle incoming notification events and notification clicks anywhere in your app.

Skip it when

  • You only need basic background messaging without local notification UI rendering.
  • You prefer to manually wire up flutter_local_notifications and firebase_messaging yourself.

Strengths

  • Simplifies foreground notification display for Firebase Cloud Messaging.
  • Provides mixins and widgets like FCMNotificationListener and FCMNotificationMixin for easy handling.
  • Supports Android, iOS, macOS, and Web platforms.

Weaknesses

  • Requires manual native setup steps for Android, iOS, macOS, and Web as documented by Firebase.
  • Limited documentation outside of basic setup and listener examples.

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
7

Requires following Firebase installation guides for Android, iOS, macOS, and Web, adding meta-data to AndroidManifest.xml, and adding firebase-messaging-sw.js for web.

void main() async {
      await FCMConfig.instance
      .init(
          defaultAndroidForegroundIcon: '@mipmap/ic_launcher',
          defaultAndroidChannel: AndroidNotificationChannel(
            'high_importance_channel',
            'Fcm config',
            importance: Importance.high,
          ),
      );
      runApp(MaterialApp(
        home: MyHomePage(),
      ));
}

Alternatives

Packages that do the same job and could replace fcm_config.

Works with

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