copyWith method

TruckRouteSearchOptions copyWith({
  1. CarRouteSearchOptions? car,
  2. Optional<int?>? truckLength,
  3. Optional<int?>? truckHeight,
  4. Optional<int?>? truckWidth,
  5. Optional<int?>? actualMass,
  6. Optional<int?>? maxPermittedMass,
  7. Optional<int?>? axleLoad,
  8. bool? dangerousCargo,
  9. bool? explosiveCargo,
  10. Set<TruckPassZonePassId>? passIds,
  11. bool? fallbackOnCar,
})

Implementation

TruckRouteSearchOptions copyWith({
  CarRouteSearchOptions? car,
  Optional<int?>? truckLength,
  Optional<int?>? truckHeight,
  Optional<int?>? truckWidth,
  Optional<int?>? actualMass,
  Optional<int?>? maxPermittedMass,
  Optional<int?>? axleLoad,
  bool? dangerousCargo,
  bool? explosiveCargo,
  Set<TruckPassZonePassId>? passIds,
  bool? fallbackOnCar
}) {
  return TruckRouteSearchOptions(
    car: car ?? this.car,
    truckLength: truckLength != null ? truckLength.value : this.truckLength,
    truckHeight: truckHeight != null ? truckHeight.value : this.truckHeight,
    truckWidth: truckWidth != null ? truckWidth.value : this.truckWidth,
    actualMass: actualMass != null ? actualMass.value : this.actualMass,
    maxPermittedMass: maxPermittedMass != null ? maxPermittedMass.value : this.maxPermittedMass,
    axleLoad: axleLoad != null ? axleLoad.value : this.axleLoad,
    dangerousCargo: dangerousCargo ?? this.dangerousCargo,
    explosiveCargo: explosiveCargo ?? this.explosiveCargo,
    passIds: passIds ?? this.passIds,
    fallbackOnCar: fallbackOnCar ?? this.fallbackOnCar
  );
}