A linear interpolation between a beginning and ending value.
Tween is useful if you want to interpolate across a range.
To use a Tween object with an animation, call the Tween object's animate()
method and
pass it the Animation object that you want to modify.
You can chain Tween objects together using the chain()
method, so that a single
Animation object is configured by multiple Tween objects called in succession. This is
different than calling the animate()
method twice, which results in two Animation
separate objects, each configured with a single Tween.
- Inheritance
- Object
- Animatable<T>
- Tween
Constructors
- Tween({T begin, T end })
-
Creates a tween.
Properties
- begin → T
-
The value this variable has at the beginning of the animation.
read / write - end → T
-
The value this variable has at the end of the animation.
read / write - hashCode → int
-
Get a hash code for this object.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
evaluate(
Animation<double> animation) → T -
Returns the interpolated value for the current value of the given animation.
-
lerp(
double t) → T -
Returns the value this variable has at the given animation clock value.
-
toString(
) → String -
Returns a string representation of this object.
-
animate(
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.
inherited -
chain(
Animatable<double> parent) → Animatable<T> -
Returns a new Animatable whose value is determined by first evaluating the given parent and then evaluating this object.
inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited