createTweens method
Build the animations driven by controller. Called from initState
after controller has been created.
Implementation
@override
void createTweens() {
final double peak = -widget.from;
_offsetY = TweenSequence<double>(<TweenSequenceItem<double>>[
TweenSequenceItem<double>(
tween: Tween<double>(begin: 0, end: peak)
.chain(CurveTween(curve: Curves.easeInOut)),
weight: 35,
),
TweenSequenceItem<double>(
tween: Tween<double>(begin: peak, end: 0)
.chain(CurveTween(curve: widget.curve)),
weight: 65,
),
]).animate(controller);
}