copyWith method
- String? tripId,
- bool? startOnMoving,
- double? startDistanceMeters,
- double? startSpeedKph,
- bool? stopOnStationary,
- int? stopTimeoutMinutes,
- double? stationarySpeedKph,
- int? updateIntervalSeconds,
- int? dwellMinutes,
- List<
RoutePoint> ? route, - double? routeDeviationThresholdMeters,
- int? routeDeviationCooldownSeconds,
- RoutePoint? destination,
- List<
RoutePoint> ? waypoints,
Creates a copy with modified values.
Implementation
TripConfig copyWith({
String? tripId,
bool? startOnMoving,
double? startDistanceMeters,
double? startSpeedKph,
bool? stopOnStationary,
int? stopTimeoutMinutes,
double? stationarySpeedKph,
int? updateIntervalSeconds,
int? dwellMinutes,
List<RoutePoint>? route,
double? routeDeviationThresholdMeters,
int? routeDeviationCooldownSeconds,
RoutePoint? destination,
List<RoutePoint>? waypoints,
}) {
return TripConfig(
tripId: tripId ?? this.tripId,
startOnMoving: startOnMoving ?? this.startOnMoving,
startDistanceMeters: startDistanceMeters ?? this.startDistanceMeters,
startSpeedKph: startSpeedKph ?? this.startSpeedKph,
stopOnStationary: stopOnStationary ?? this.stopOnStationary,
stopTimeoutMinutes: stopTimeoutMinutes ?? this.stopTimeoutMinutes,
stationarySpeedKph: stationarySpeedKph ?? this.stationarySpeedKph,
updateIntervalSeconds:
updateIntervalSeconds ?? this.updateIntervalSeconds,
dwellMinutes: dwellMinutes ?? this.dwellMinutes,
route: route ?? this.route,
routeDeviationThresholdMeters:
routeDeviationThresholdMeters ?? this.routeDeviationThresholdMeters,
routeDeviationCooldownSeconds:
routeDeviationCooldownSeconds ?? this.routeDeviationCooldownSeconds,
destination: destination ?? this.destination,
waypoints: waypoints ?? this.waypoints,
);
}