getAccessToken method

Future<String> getAccessToken()

Gets the token of the current logged-in user.

Implementation

Future<String> getAccessToken() async {
  try {
    Map result =
        await platform_interface.Client.instance.callNativeMethod(ChatMethodKeys.getToken);
    ChatError.hasErrorFromResult(result);
    return result[ChatMethodKeys.getToken];
  } catch (e) {
    rethrow;
  }
}