copyWith method

TreeAnimationSpec copyWith({
  1. Duration? duration,
  2. Curve? curve,
})

Copies with the given fields replaced; omitted fields keep theirs.

Implementation

TreeAnimationSpec copyWith({Duration? duration, Curve? curve}) {
  return TreeAnimationSpec(
    duration: duration ?? this.duration,
    curve: curve ?? this.curve,
  );
}