CurvedAnimationController<T>.sequence constructor
CurvedAnimationController<T>.sequence (
- List<
SequenceItem> sequence, - Duration? duration, {
- Curve curve = Curves.linear,
- Curve? reverseCurve = Curves.linear,
- Duration? reverseDuration,
- String? debugLabel,
- AnimationBehavior animationBehavior = AnimationBehavior.normal,
- required TickerProvider vsync,
Implementation
CurvedAnimationController.sequence(
List<SequenceItem> sequence,
this.duration, {
this.curve = Curves.linear,
this.reverseCurve = Curves.linear,
this.reverseDuration,
this.debugLabel,
this.animationBehavior = AnimationBehavior.normal,
required this.vsync,
}) {
_tweenSequence = TweenSequence(sequence
.map((item) => TweenSequenceItem(
tween: Tween(begin: item.begin, end: item.end),
weight: item.weight,
))
.toList());
_controller = AnimationController(
vsync: vsync,
animationBehavior: animationBehavior,
debugLabel: debugLabel,
reverseDuration: reverseDuration,
duration: duration,
);
_animation = _tweenSequence!.animate(CurvedAnimation(
parent: _controller,
curve: curve,
reverseCurve: reverseCurve,
));
}