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.
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.
- onesignal_flutter
If you prefer using OneSignal instead of Firebase for push notifications.
82Compare
Works with
Packages commonly used together with fcm_config: ones it builds on, ones built on it, and its own family.
- webfcm_config depends on itLightweight bindings for browser APIs via JS interop
- plugin_platform_interfacefcm_config depends on itReusable base class for platform interfaces of Flutter federated plugins.
- path_providerfcm_config depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- firebase_corefcm_config depends on itFlutter plugin that initializes Firebase and allows multiple Firebase app connections.
- firebase_messagingfcm_config depends on itFlutter plugin for Firebase Cloud Messaging to deliver messages on Android, iOS, web, and macOS.
- flutter_local_notificationsfcm_config depends on itCross-platform plugin for displaying and scheduling local notifications.