TweenSequence<T> class
An Animatable that chains multiple tweens end-to-end with proportional durations.
Each TweenSequenceItem defines a tween and a weight. The weights are normalized so that they describe what fraction of the total animation each segment takes. For example, two items with weight 1 each get 50% of the time apiece.
final sequence = TweenSequence<double>([
TweenSequenceItem(tween: Tween(begin: 0, end: 100), weight: 1),
TweenSequenceItem(tween: ConstantTween(100), weight: 0.5),
TweenSequenceItem(tween: Tween(begin: 100, end: 0), weight: 1),
]);
- Inheritance
-
- Object
- Animatable<
T> - TweenSequence
Constructors
-
TweenSequence(List<
TweenSequenceItem< items)T> > - Creates a tween sequence from the given items.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
animate(
Animation< double> parent) → Animation<T> -
Creates a new Animation by applying this animatable on top of
parent.inherited -
chain(
Animatable< double> parent) → Animatable<T> -
Chains this animatable after
parent.inherited -
evaluate(
Animation< double> animation) → T -
Evaluates this animatable at the current value of
animation.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
transform(
double t) → T -
Returns the value of this animatable at the given
t.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited