FCM class

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

deleteRefreshToken() → dynamic
Delete the FCM refresh token and retrieve a new token.
initializeFCM({required void onTokenChanged(String? token), void onNotificationPressed(Map<String, dynamic> data)?, required BackgroundMessageHandler onNotificationReceived, GlobalKey<NavigatorState>? navigatorKey, required String icon, bool withLocalNotification = true}) → dynamic
Initialize Firebase Cloud Messaging and set up notification handling.
subscribeToTopic(String topic) → dynamic
To subscribe to a topic, call subscribeToTopic() with the topic name. This method returns a Future, which resolves when the subscription succeeded:
unsubscribeFromTopic(String topic) → dynamic
To unsubscribe from a topic, call the unsubscribeFromTopic method with the topic name: