fetchJoinedGroupCount method

Future<int> fetchJoinedGroupCount()

从服务器获取当前用户已加入的群组数量。

Return 已加入的群组数量。

Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError

Implementation

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