copyWith method

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

Implementation

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