copyWith method

LotsOptions copyWith({
  1. double? maxShakeDeg,
  2. int? visibleSticks,
  3. Duration? riseTime,
  4. Duration? revealTime,
  5. bool? revealOnSettle,
  6. LuckyEasing? riseEasing,
  7. LuckyEasing? revealEasing,
  8. LotsShakeWaveform? shakeWaveform,
  9. LotsLayoutAdjuster? layoutAdjuster,
  10. LuckyMotionOptions? motion,
})

返回只替换非空参数的副本。

Implementation

LotsOptions copyWith(
        {double? maxShakeDeg,
        int? visibleSticks,
        Duration? riseTime,
        Duration? revealTime,
        bool? revealOnSettle,
        LuckyEasing? riseEasing,
        LuckyEasing? revealEasing,
        LotsShakeWaveform? shakeWaveform,
        LotsLayoutAdjuster? layoutAdjuster,
        LuckyMotionOptions? motion}) =>
    LotsOptions(
        maxShakeDeg: maxShakeDeg ?? this.maxShakeDeg,
        visibleSticks: visibleSticks ?? this.visibleSticks,
        riseTime: riseTime ?? this.riseTime,
        revealTime: revealTime ?? this.revealTime,
        revealOnSettle: revealOnSettle ?? this.revealOnSettle,
        riseEasing: riseEasing ?? this.riseEasing,
        revealEasing: revealEasing ?? this.revealEasing,
        shakeWaveform: shakeWaveform ?? this.shakeWaveform,
        layoutAdjuster: layoutAdjuster ?? this.layoutAdjuster,
        motion: motion ?? this.motion);