copyWith method
LuckyMotionOptions
copyWith({
- double? speed,
- Duration? accelerationTime,
- Duration? decelerationTime,
- LuckyEasing? accelerationEasing,
- LuckyEasing? decelerationEasing,
- LuckyTimebase? timebase,
- LuckyStopSolver? stopSolver,
- Duration? maxFrameDelta,
- double? idleSpinSpeed,
返回只替换非 null 参数的副本;例如 options.copyWith(speed: 30)。
Implementation
LuckyMotionOptions copyWith(
{double? speed,
Duration? accelerationTime,
Duration? decelerationTime,
LuckyEasing? accelerationEasing,
LuckyEasing? decelerationEasing,
LuckyTimebase? timebase,
LuckyStopSolver? stopSolver,
Duration? maxFrameDelta,
double? idleSpinSpeed}) =>
LuckyMotionOptions(
speed: speed ?? this.speed,
accelerationTime: accelerationTime ?? this.accelerationTime,
decelerationTime: decelerationTime ?? this.decelerationTime,
accelerationEasing: accelerationEasing ?? this.accelerationEasing,
decelerationEasing: decelerationEasing ?? this.decelerationEasing,
timebase: timebase ?? this.timebase,
stopSolver: stopSolver ?? this.stopSolver,
maxFrameDelta: maxFrameDelta ?? this.maxFrameDelta,
idleSpinSpeed: idleSpinSpeed ?? this.idleSpinSpeed);