copyWith method

  1. @override
TePacket copyWith({
  1. DateTime? timestamp,
  2. String? tripId,
  3. double? distanceTraveled,
  4. double? maxSpeed,
  5. Duration? duration,
})
override

Implementation

@override
TePacket copyWith({
  DateTime? timestamp,
  String? tripId,
  double? distanceTraveled,
  double? maxSpeed,
  Duration? duration,
}) {
  return TePacket(
    timestamp: timestamp ?? this.timestamp,
    tripId: tripId ?? this.tripId,
    distanceTraveled: distanceTraveled ?? this.distanceTraveled,
    maxSpeed: maxSpeed ?? this.maxSpeed,
    duration: duration ?? this.duration,
  );
}