copyWith method

  1. @override
OSRMRoad copyWith({
  1. double? distance,
  2. double? duration,
  3. String? polylineEncoded,
  4. List<LngLat>? polyline,
  5. List<Route>? alternativesRoads,
  6. List<RouteInstruction>? instructions,
})
override

Implementation

@override
OSRMRoad copyWith({
  double? distance,
  double? duration,
  String? polylineEncoded,
  List<LngLat>? polyline,
  List<Route>? alternativesRoads,
  List<RouteInstruction>? instructions,
}) =>
    OSRMRoad._init(
      distance: distance ?? this.distance,
      duration: duration ?? this.duration,
      polylineEncoded: polylineEncoded ?? this.polylineEncoded,
      polyline: polyline ?? this.polyline,
      alternativesRoads: alternativesRoads,
      instructions: instructions ?? this.instructions,
      legs: _roadLegs,
    );