removeAdmin method
~english Removes a group admin.
Only the group owner can call this method.
Param groupId The group ID.
Param adminId The username of the admin to remove.
Throws A description of the exception. See ChatError. ~end
~chinese 删除群组管理员。
仅群主可调用此方法。
Param groupId  群组 ID。
Param adminId 要移除的群组管理员的用户 ID。
Return 返回更新后的群组对象。
Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 ChatError。 ~end
Implementation
Future<void> removeAdmin(
  String groupId,
  String adminId,
) async {
  Map req = {'groupId': groupId, 'admin': adminId};
  Map result = await _channel.invokeMethod(ChatMethodKeys.removeAdmin, req);
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}