copyWith method
Location
copyWith({
- LocationCoordinates? coordinates,
- Optional<
LocationFuzzyDouble?> ? altitude, - Optional<
LocationCourse?> ? course, - Optional<
LocationFuzzyDouble?> ? groundSpeed, - Duration? timestamp,
Implementation
Location copyWith({
LocationCoordinates? coordinates,
Optional<LocationFuzzyDouble?>? altitude,
Optional<LocationCourse?>? course,
Optional<LocationFuzzyDouble?>? groundSpeed,
Duration? timestamp
}) {
return Location(
coordinates: coordinates ?? this.coordinates,
altitude: altitude != null ? altitude.value : this.altitude,
course: course != null ? course.value : this.course,
groundSpeed: groundSpeed != null ? groundSpeed.value : this.groundSpeed,
timestamp: timestamp ?? this.timestamp
);
}