NotificationManager class

Dealing with firebase cloud messaging

Constructors

NotificationManager.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

cancelAllNotification() → void
Cancels all scheduled and displayed notifications.
cancelNotification({required int notificationId}) → void
Cancels a specific notification by its ID.
firebaseMessaging({dynamic callback(NotificationModel)?}) Future<void>
Initializes Firebase and sets up listeners for Firebase Cloud Messaging (FCM).
getFirebasePermissionAndToken({required dynamic callback(String?)}) Future
Requests Firebase Cloud Messaging (FCM) permission from the user and retrieves the device token.
initFlutterNotifications({required String apiKey, required String appId, required String messagingSenderId, required String projectId, String? authDomain, String? databaseURL, String? storageBucket, String? measurementId, String? androidClientId, String? iosClientId, String? iosBundleId}) Future<void>
Initializes Firebase and Flutter local notifications with the provided Firebase project configuration.
showNotification({String? title, String? body, Map<String, dynamic>? otherData, dynamic callback(NotificationModel)?}) Future<void>
Displays a local notification with an optional title, body, and additional data.