copyWith method
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,
);