FirebaseMessagingWeb class

An interface that make it easier to use FCM interop.

Constructors

FirebaseMessagingWeb({String? publicVapidKey})
If the publicVapidKey is specified, the init function will be call in the constructor. If not, then the init method should be called before using any other function related to FCM

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

deleteToken(String? token) Future<bool>
Deletes the current FCM token.
getToken() Future<String>
Retrieves the client FCM token. (The client must first ask for the permission requestNotificationPermissions)
init(String publicVapidKey) → void
Initiates Firebase Messaging and set the publicVapidKey.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMessage(dynamic callBack(Map<String, dynamic>? message)) → void
Adds a callback allowing to retrieve the FCM payload
onTokenRefresh(dynamic callBack()) → void
Adds a callback allowing to retrieve the new token after it was refreshed.
requestNotificationPermissions() Future<bool>
Prompts the user for notification permissions the first time
toString() String
A string representation of this object.
inherited

Operators

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