copyWith method

AnimationStyle copyWith({
  1. Curve? curve,
  2. Duration? duration,
  3. Curve? reverseCurve,
  4. Duration? reverseDuration,
})

Creates a new AnimationStyle based on the current selection, with the provided parameters overridden.

Implementation

AnimationStyle copyWith({
  final Curve? curve,
  final Duration? duration,
  final Curve? reverseCurve,
  final Duration? reverseDuration,
}) {
  return AnimationStyle(
    curve: curve ?? this.curve,
    duration: duration ?? this.duration,
    reverseCurve: reverseCurve ?? this.reverseCurve,
    reverseDuration: reverseDuration ?? this.reverseDuration,
  );
}