copyWith method
- List<
RaliPosition> ? points, - double? distance,
- double? duration,
- List<
NavigationStep> ? steps, - BoundingBox? bounds,
- RouteEmphasis? emphasis,
- Map<
String, dynamic> ? trafficAnnotations, - Map<
String, double> ? speedLimits, - List<
Hazard> ? hazards, - Map<
String, List< ? landmarks,Landmark> > - List<
WeatherAlert> ? weatherAlerts,
Creates a copy of this route with modified properties
Implementation
RouteDetails copyWith({
List<RaliPosition>? points,
double? distance,
double? duration,
List<NavigationStep>? steps,
BoundingBox? bounds,
RouteEmphasis? emphasis,
Map<String, dynamic>? trafficAnnotations,
Map<String, double>? speedLimits,
List<Hazard>? hazards,
Map<String, List<Landmark>>? landmarks,
List<WeatherAlert>? weatherAlerts,
}) {
return RouteDetails(
points: points ?? this.points,
distance: distance ?? this.distance,
duration: duration ?? this.duration,
steps: steps ?? this.steps,
bounds: bounds ?? this.bounds,
emphasis: emphasis ?? this.emphasis,
trafficAnnotations: trafficAnnotations ?? this.trafficAnnotations,
speedLimits: speedLimits ?? this.speedLimits,
hazards: hazards ?? this.hazards,
landmarks: landmarks ?? this.landmarks,
weatherAlerts: weatherAlerts ?? this.weatherAlerts,
);
}