CurvedAnimationController<T> constructor
CurvedAnimationController<T> (
- {T? begin,
- T? end,
- required Curve curve,
- Duration? duration,
- Curve? reverseCurve,
- Duration? reverseDuration,
- String? debugLabel,
- AnimationBehavior animationBehavior = AnimationBehavior.normal,
- required TickerProvider vsync}
Implementation
CurvedAnimationController({
this.begin,
this.end,
required this.curve,
this.duration,
this.reverseCurve,
this.reverseDuration,
this.debugLabel,
this.animationBehavior = AnimationBehavior.normal,
required this.vsync,
}) {
_tween = Tween(begin: begin ?? 0.0, end: end ?? 1.0);
_controller = AnimationController(
vsync: vsync,
animationBehavior: animationBehavior,
debugLabel: debugLabel,
reverseDuration: reverseDuration,
duration: duration,
);
_animation = _tween!.animate(CurvedAnimation(
parent: _controller,
curve: curve,
reverseCurve: reverseCurve,
));
}