addFriendsToFriendGroup method

Future addFriendsToFriendGroup(
  1. Map<String, dynamic> params
)

Implementation

Future<dynamic> addFriendsToFriendGroup(Map<String, dynamic> params) async {
  try {
    final formateParams = mapToJSObj(
        {"name": params["groupName"], "userIDList": params["userIDList"]});
    final res = await wrappedPromiseToFuture(
        timeWeb!.addToFriendGroup(formateParams));
    log(res);
    final formateResult = FriendBlackList.formateDeleteBlackListRes(
        jsToMap(jsToMap(res.data)['friendGroup'])['userIDList']);
    return CommonUtils.returnSuccess<List<V2TimFriendOperationResult>>(
        formateResult);
  } catch (error) {
    return CommonUtils.returnErrorForValueCb<
        List<V2TimFriendOperationResult>>(error);
  }
}