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