getToken method
Return a token that allows the authorized entity to access the service
defined by scope.
getTokenParams
Parameters for getToken.
returns
Function called when the retrieval completes. It should check
runtime.lastError
for error when token is empty.
Implementation
Future<String> getToken(GetTokenParams getTokenParams) async {
var $res = await promiseToFuture<String>(
$js.chrome.instanceId.getToken(getTokenParams.toJS));
return $res;
}