copyWith method

AnimationPreferences copyWith({
  1. Duration? offset,
  2. Duration? duration,
  3. AnimationPlayStates? autoPlay,
  4. AnimationStatusListener? animationStatusListener,
})

Shorthand to initialize a copy with one or more changed parameters.

Implementation

AnimationPreferences copyWith({
  Duration? offset,
  Duration? duration,
  AnimationPlayStates? autoPlay,
  AnimationStatusListener? animationStatusListener,
}) {
  return AnimationPreferences(
    offset: offset ?? this.offset,
    duration: duration ?? this.duration,
    autoPlay: autoPlay ?? this.autoPlay,
    animationStatusListener:
        animationStatusListener ?? this.animationStatusListener,
  );
}