copyWith method

TrafficLineModel copyWith({
  1. double? routeProgress,
  2. double? routePosition()?,
  3. double? routeLength,
  4. List<GeoPointRouteEntry>? intermediatePoints,
  5. List<TrafficSpeedColorRouteLongEntry>? speedColors,
  6. List<RoadEventRouteEntry>? roadEvents,
})

Implementation

TrafficLineModel copyWith({
  double? routeProgress,
  double? Function()? routePosition,
  double? routeLength,
  List<sdk.GeoPointRouteEntry>? intermediatePoints,
  List<sdk.TrafficSpeedColorRouteLongEntry>? speedColors,
  List<sdk.RoadEventRouteEntry>? roadEvents,
}) {
  return TrafficLineModel(
    routeLength: routeLength ?? this.routeLength,
    routeProgress: routeProgress ?? this.routeProgress,
    routePosition:
        routePosition != null ? routePosition() : this.routePosition,
    intermediatePoints: intermediatePoints ?? this.intermediatePoints,
    speedColors: speedColors ?? this.speedColors,
    roadEvents: roadEvents ?? this.roadEvents,
  );
}