setPushToken method
Set push notification token
Registers the FCM (Firebase Cloud Messaging) or APNS (Apple Push Notification Service) token with the Grovs SDK for push notification support
token - The push notification token from FCM or APNS
Throws GrovsException if the operation fails
Example:
// FCM token
final messaging = FirebaseMessaging.instance;
final token = await messaging.getToken();
if (token != null) {
await Grovs().setPushToken(token);
}
Implementation
Future<void> setPushToken(String token) {
return GrovsPlatform.instance.setPushToken(token);
}