kickGroupMember method

  1. @override
Future<V2TimCallback> kickGroupMember({
  1. required String groupID,
  2. required List<String> memberList,
  3. int? duration,
  4. String? reason,
})
override

踢人

注意

工作群(Work):只有群主或 APP 管理员可以踢人。
公开群(Public)、会议群(Meeting):群主、管理员和 APP 管理员可以踢人
直播群(AVChatRoom):只支持禁言(muteGroupMember),不支持踢人。

Implementation

@override
Future<V2TimCallback> kickGroupMember({
  required String groupID,
  required List<String> memberList,
  int? duration,
  String? reason,
}) async {
  Map<String, dynamic> param = {
    "groupID": groupID,
    "memberList": memberList,
    "reason": reason,
    "duration": duration ?? 0,
  };
  var resp = V2TimCallback.fromJson(
    formatJson(
      await _channel.invokeMethod(
        "kickGroupMember",
        buildGroupManagerParam(
          param,
        ),
      ),
    ),
  );
  log("kickGroupMember", param, resp.toLogString());
  return resp;
}