getAccessToken method

Future<String> getAccessToken()

Gets the token of the current logged-in user.

Implementation

Future<String> getAccessToken() async {
  Map result = await ClientChannel.invokeMethod(ChatMethodKeys.getToken);
  try {
    ChatError.hasErrorFromResult(result);
    return result[ChatMethodKeys.getToken];
  } on ChatError catch (e) {
    throw e;
  }
}