markGroupMemberList static method

Future<V2TimCallback> markGroupMemberList({
  1. required String groupID,
  2. required List<String> memberIDList,
  3. required int markType,
  4. required bool enableMark,
})

Implementation

static Future<V2TimCallback> markGroupMemberList({
  required String groupID,
  required List<String> memberIDList,
  required int markType,
  required bool enableMark,
}) async {
  String userData = Tools.generateUserData();
  Pointer<Uint8> user_data = Tools.string2PointerInt8(userData);
  Pointer<Uint8> memberIDListPtr = Tools.string2PointerInt8(json.encode(memberIDList));
  Pointer<Uint8> groupIDPtr = Tools.string2PointerInt8(groupID);
  int res = desktopSDK.D_TIMGroupMarkGroupMemberList(groupIDPtr, memberIDListPtr, markType, enableMark ? 1 : 0, 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"],
    });
  }
}