loadForm method

void loadForm(
  1. UParkingTariffResponse? t
)

Implementation

void loadForm(UParkingTariffResponse? t) {
  parkingId = t?.parkingId ?? parking?.id ?? "";
  entranceController.text = t?.entrancePrice.toStringAsSmartRound(maxPrecision: 0) ?? "";
  dayHourlyController.text = t?.dayHourlyPrice.toStringAsSmartRound(maxPrecision: 0) ?? "";
  nightHourlyController.text = t?.nightHourlyPrice.toStringAsSmartRound(maxPrecision: 0) ?? "";
  dailyCapController.text = t?.dailyCap.toStringAsSmartRound(maxPrecision: 0) ?? "";
  weeklyController.text = t?.weeklyPrice.toStringAsSmartRound(maxPrecision: 0) ?? "";
  monthlyController.text = t?.monthlyPrice.toStringAsSmartRound(maxPrecision: 0) ?? "";
  quarterlyController.text = t?.quarterlyPrice.toStringAsSmartRound(maxPrecision: 0) ?? "";
  freeMinutesController.text = (t?.freeMinutes ?? 0).toString();
  vehicleType = TagVehicle.values.fromNumber(t?.vehicleType ?? TagVehicle.car.number) ?? TagVehicle.car;
  roundToFullHour = t?.roundToFullHour ?? false;
  perMinuteAfterFirstHour = t?.perMinuteAfterFirstHour ?? true;
}