copyWith method

ParkingInfo copyWith({
  1. Optional<ParkingType?>? type,
  2. ParkingPurpose? purpose,
  3. ParkingAccess? access,
  4. Optional<ParkingPavingType?>? pavingType,
  5. bool? isPaid,
  6. bool? isIncentive,
  7. bool? forTrucks,
  8. Optional<int?>? levelCount,
  9. Optional<ParkingCapacity?>? capacity,
})

Implementation

ParkingInfo copyWith({
  Optional<ParkingType?>? type,
  ParkingPurpose? purpose,
  ParkingAccess? access,
  Optional<ParkingPavingType?>? pavingType,
  bool? isPaid,
  bool? isIncentive,
  bool? forTrucks,
  Optional<int?>? levelCount,
  Optional<ParkingCapacity?>? capacity
}) {
  return ParkingInfo(
    type: type != null ? type.value : this.type,
    purpose: purpose ?? this.purpose,
    access: access ?? this.access,
    pavingType: pavingType != null ? pavingType.value : this.pavingType,
    isPaid: isPaid ?? this.isPaid,
    isIncentive: isIncentive ?? this.isIncentive,
    forTrucks: forTrucks ?? this.forTrucks,
    levelCount: levelCount != null ? levelCount.value : this.levelCount,
    capacity: capacity != null ? capacity.value : this.capacity
  );
}