copyWith method
Create a copy with modified properties
Implementation
VehicleConfig copyWith({
Color? primaryColor,
double? size,
VehicleDirection? direction,
bool? isFlashing,
bool? isCrashed,
bool? showEffects,
double? animationSpeed,
}) {
return VehicleConfig(
primaryColor: primaryColor ?? this.primaryColor,
size: size ?? this.size,
direction: direction ?? this.direction,
isFlashing: isFlashing ?? this.isFlashing,
isCrashed: isCrashed ?? this.isCrashed,
showEffects: showEffects ?? this.showEffects,
animationSpeed: animationSpeed ?? this.animationSpeed,
);
}