Each TweenSequenceItem has a weight that defines its percentage of the animation's duration. Each tween defines the animation's value during the interval indicated by its weight.
This example defines an animation that uses an easing curve to interpolate between 5.0 and 10.0 during the first 40% of the animation, remains at 10.0 for the next 20%, and then returns to 5.0 for the final 40%.link
final Animation<double> animation = TweenSequence<double>( <TweenSequenceItem<double>>[ TweenSequenceItem<double>( tween: Tween<double>(begin: 5.0, end: 10.0) .chain(CurveTween(curve: Curves.ease)), weight: 40.0, ), TweenSequenceItem<double>( tween: ConstantTween<double>(10.0), weight: 20.0, ), TweenSequenceItem<double>( tween: Tween<double>(begin: 10.0, end: 5.0) .chain(CurveTween(curve: Curves.ease)), weight: 40.0, ), ], ).animate(myAnimationController);
Animation< double>parent) → Animation< T>
Returns a new Animation that is driven by the given animation but that
takes on values determined by this object.
Animatable< double>parent) → Animatable< T>
Returns a new Animatable whose value is determined by first evaluating
the given parent and then evaluating this object.
Animation< double>animation) → T
The current value of this object for the given Animation.
Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
) → String
A string representation of this object.
double t) → T
Returns the value of the object at point