setPushNotificationsToken static method

Future<void> setPushNotificationsToken(
  1. String? token
)

Sets token used to send push notifications (Only Android).

Set null if you want to remove token.

Implementation

static Future<void> setPushNotificationsToken(String? token) async {
  if (Platform.isAndroid) {
    await _channel
        .invokeMethod('setPushNotificationsToken', {'token': token});
  }
}