getToken method

void getToken({
  1. required dynamic callback(
    1. String token
    ),
})

Returns token to callback.

Implementation

void getToken({required Function(String token) callback}) async {
  if (_initialized) {
    callback(await channel.invokeMethod('getToken') ?? 'null');
  } else {
    _pendingCallbackMethods.add(
        _PendingCallbackMethod(methodName: 'getToken', callback: callback));
  }
}