fetchJoinedGroupCount method
~english Gets groups count of the current user joined from the server.
Return The count of groups joined by the current user.
Throws A description of the exception. See ChatError.
~end
~chinese 从服务器获取当前用户已加入的群组数量。
Return 加入的群组数量。
Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 ChatError。 ~end
Implementation
Future<int> fetchJoinedGroupCount() async {
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.fetchJoinedGroupCount);
  try {
    ChatError.hasErrorFromResult(result);
    int count = result[ChatMethodKeys.fetchJoinedGroupCount];
    return count;
  } on ChatError catch (e) {
    throw e;
  }
}