copyWith method

DrivePath copyWith({
  1. int? restriction,
  2. List<Steps>? steps,
  3. String? strategy,
  4. num? tollDistance,
  5. num? totalDuration,
  6. num? totalDistance,
  7. num? tolls,
  8. int? totalTrafficlights,
})

Implementation

DrivePath copyWith({
  int? restriction,
  List<Steps>? steps,
  String? strategy,
  num? tollDistance,
  num? totalDuration,
  num? totalDistance,
  num? tolls,
  int? totalTrafficlights,
}) {
  return DrivePath(
    restriction: restriction ?? this.restriction,
    steps: steps ?? this.steps,
    strategy: strategy ?? this.strategy,
    tollDistance: tollDistance ?? this.tollDistance,
    totalDuration: totalDuration ?? this.totalDuration,
    totalDistance: totalDistance ?? this.totalDistance,
    tolls: tolls ?? this.tolls,
    totalTrafficlights: totalTrafficlights ?? this.totalTrafficlights,
  );
}