An animation with a value of type T
An animation consists of a value (of type T) together with a status. The status indicates whether the animation is conceptually running from beginning to end or from the end back to the beginning, although the actual value of the animation might not change monotonically (e.g., if the animation uses a curve that bounces).
Animations also let other objects listen for changes to either their value or their status. These callbacks are called during the "animation" phase of the pipeline, just prior to rebuilding widgets.
To create a new animation that you can run forward and backward, consider using AnimationController.
- Inheritance
- Object
- Listenable
- Animation
Constructors
- Animation()
-
Abstract const constructor. This constructor enables subclasses to provide const constructors so that they can be used in const expressions.
const
Properties
- isCompleted → bool
-
Whether this animation is stopped at the end.
read-only - isDismissed → bool
-
Whether this animation is stopped at the beginning.
read-only - status → AnimationStatus
-
The current status of this animation.
read-only - value → T
-
The current value of the animation.
read-only - 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
-
addListener(
VoidCallback listener) → void -
Calls the listener every time the value of the animation changes.
-
addStatusListener(
AnimationStatusListener listener) → void -
Calls listener every time the status of the animation changes.
-
removeListener(
VoidCallback listener) → void -
Stop calling the listener every time the value of the animation changes.
-
removeStatusListener(
AnimationStatusListener listener) → void -
Stops calling the listener every time the status of the animation changes.
-
toString(
) → String -
Returns a string representation of this object.
-
toStringDetails(
) → String -
Provides a string describing the status of this object, but not including information about the object itself.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited