getAccessToken method

Future<String> getAccessToken()

~english Gets the token of the current logged-in user. ~end

~chinese 获取当前登录账号的 Token。

Return 当前登录账号的 Token。 ~end

Implementation

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