Tween<T extends dynamic> class

A linear interpolation between a begin and end value.

The lerp method defines how values of type T are interpolated. Subclasses override lerp for specific types (int, double, Color, etc.).

A Tween is an Animatable that maps a double in 0.0, 1.0 to a value of type T.

Inheritance

Constructors

Tween({T? begin, T? end})
Creates a tween that linearly interpolates between begin and end.

Properties

begin ↔ T?
The value at the beginning of the animation (t = 0.0).
getter/setter pair
end ↔ T?
The value at the end of the animation (t = 1.0).
getter/setter pair
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
lerp(double t) → T
Returns the interpolated value for the given animation parameter t.
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