deleteFriendGroup static method

Future<V2TimCallback> deleteFriendGroup({
  1. required List<String> groupNameList,
})

Implementation

static Future<V2TimCallback> deleteFriendGroup({
  required List<String> groupNameList,
}) async {
  String param = json.encode(List<String>.from(groupNameList));
  String userData = Tools.generateUserData();
  Pointer<Uint8> user_data = Tools.string2PointerInt8(userData);
  Pointer<Uint8> json_delete_friend_group_param = Tools.string2PointerInt8(param);
  int res = desktopSDK.D_TIMFriendshipDeleteFriendGroup(json_delete_friend_group_param, user_data);
  if (res != TIMResult.TIM_SUCC) {
    return V2TimCallback.fromJson({
      "code": res,
      "desc": "",
    });
  } else {
    Map<String, dynamic> data = await getAsyncData(apiKey: userData);
    return V2TimCallback.fromJson({
      "code": data["code"],
      "desc": data["desc"],
    });
  }
}