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 {
  Map result = await ClientChannel.invokeMethod(ChatMethodKeys.getToken);
  try {
    EMError.hasErrorFromResult(result);
    return result[ChatMethodKeys.getToken];
  } on EMError catch (e) {
    throw e;
  }
}