setPushToken method

  1. @override
Future<void> setPushToken(
  1. String token
)
override

Set the push token for receiving push notifications

Implementation

@override
Future<void> setPushToken(String token) async {
  try {
    await methodChannel.invokeMethod('setPushToken', {'token': token});
  } on PlatformException catch (e) {
    throw GrovsException(
      e.message ?? 'Failed to set push token',
      code: e.code,
    );
  }
}