checkStationDesign method

Future<bool> checkStationDesign(
  1. RoomModel model,
  2. StationData station, {
  3. dynamic callback(
    1. bool isExist
    )?,
})

Implementation

Future<bool> checkStationDesign(RoomModel model, StationData station,
    {Function(bool isExist)? callback}) async {
  StationData satation = model.stationDataList!.first;
  Map<String, dynamic> map = {
    "roomTaskId": model.id,
    "actualOrder": satation.actualOrder
  };
  Map? res = await UnitsForNetwork.getHttp(checkDesignApi, parameters: map);
  bool isExist = true;
  if (res!["data"] == false) {
    isExist = false;
  }
  debugPrint(res.toString());
  if (callback != null) {
    callback(isExist);
  }
  return isExist;
}