firebase_messaging_handler library

Classes

AnalyticsServiceInterface
Interface for analytics service operations
BridgingPayloadValidator
Validates data-only / bridging payloads before promotion or unified handling.
BuiltInInAppTemplates
FCMConfiguration
Immutable configuration object describing how the handler should initialize Firebase Messaging, local notifications, analytics, and storage behavior.
FCMLogger
Logger class for FCM operations
FCMService
Firebase Cloud Messaging service implementation
FCMServiceInterface
Interface for Firebase Cloud Messaging service operations
FirebaseMessagingHandler
A comprehensive Firebase Cloud Messaging handler for Flutter applications.
FirebaseMessagingHandlerLinux
Linux platform registration stub for firebase_messaging_handler.
FirebaseMessagingHandlerMacos
macOS platform registration stub for firebase_messaging_handler.
FirebaseMessagingHandlerNotificationService
Local notification service implementation for Firebase Messaging Handler
FirebaseMessagingHandlerWindows
Windows platform registration stub for firebase_messaging_handler.
FmhAnalyticsService
Analytics service implementation
ForegroundNotificationContext
Snapshot of a foreground remote message used to build local presentation options at display time.
ForegroundNotificationOptions
Controls how foreground remote messages are translated into local notifications when the app is active.
GenericTemplateButton
GenericTemplateConfig
GenericTemplatePage
InAppDeliveryDecision
Result of evaluating whether an in-app message may be shown now.
InAppDeliveryPolicy
Global policy used to throttle or defer in-app notification presentation.
InAppDeliveryStats
Mutable counters used to evaluate InAppDeliveryPolicy decisions.
InAppMessageManager
InAppNotificationData
InAppNotificationTemplate
Describes a registered in-app template and how it should be displayed.
InAppQuietHours
Defines a quiet-hours window during which in-app presentation should be deferred.
InAppTemplatePresenter
InboxStorageService
InMemoryInboxStorage
LogEntry
Log entry class
NormalizedMessage
Lifecycle-agnostic representation of an incoming notification event.
NotificationAction
NotificationChannelData
Describes a notification channel and its defaults for Android delivery.
NotificationData
NotificationDiagnosticsResult
Snapshot returned by runDiagnostics() summarizing notification readiness.
NotificationInboxItem
NotificationInboxStorageInterface
Persistence abstraction used by NotificationInboxView and inbox services.
NotificationInboxTheme
Visual customization options for NotificationInboxView.
NotificationInboxView
NotificationManager
Manager class for handling notification lifecycle and operations
NotificationServiceInterface
Interface for local notification service operations
PermissionWizardResult
Rich result returned by the permission wizard helper.
StorageService
Storage service implementation using SharedPreferences
StorageServiceInterface
Interface for storage service operations

Functions

firebaseMessagingHandlerBackgroundDispatcher(RemoteMessage message) Future<void>
Default background dispatcher entry point that forwards work into the package-managed background handler pipeline.

Typedefs

AnalyticsCallback = FutureOr<void> Function(String event, Map<String, dynamic> data)
AndroidForegroundNotificationBuilder = FutureOr<AndroidNotificationDetails?> Function(ForegroundNotificationContext context)
Builds Android foreground notification details dynamically for a message.
BackgroundMessageCallback = Future<bool> Function(RemoteMessage message)
DataOnlyMessageBridge = Future<void> Function(RemoteMessage message)
InAppNotificationDisplayCallback = FutureOr<void> Function(InAppNotificationData data)
Callback invoked when a template should render a received in-app payload.
InAppTemplateActionCallback = void Function(String actionId, InAppNotificationData data)
IOSForegroundNotificationBuilder = FutureOr<DarwinNotificationDetails?> Function(ForegroundNotificationContext context)
Builds iOS foreground notification details dynamically for a message.
NotificationInboxActionTap = void Function(String actionId, NotificationInboxItem item)
NotificationInboxDelete = Future<void> Function(List<String> ids)
NotificationInboxItemTap = void Function(NotificationInboxItem item)
UnifiedMessageHandler = Future<bool> Function(NormalizedMessage message, NotificationLifecycle lifecycle)

Exceptions / Errors

AnalyticsError
Error thrown when analytics operations fail
ConfigurationError
Error thrown when configuration is invalid
FCMError
Base class for FCM-related errors
FCMInitializationError
Error thrown when FCM initialization fails
FCMTokenError
Error thrown when FCM token operations fail
NotificationError
Error thrown when notification operations fail
PermissionError
Error thrown when permission operations fail
StorageError
Error thrown when storage operations fail