Animation<T> class
abstract
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.
See also:
- Inheritance
-
- Object
- Listenable
- Animation
- Implemented types
- Implementers
Constructors
- Animation()
-
Abstract const constructor. This constructor enables subclasses to provide
const constructors so that they can be used in const expressions.
const
-
Animation.fromValueListenable(ValueListenable<
T> listenable, {ValueListenableTransformer<T> ? transformer}) -
Create a new animation from a ValueListenable.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAnimating → bool
-
Whether this animation is running in either direction.
no setter
- isCompleted → bool
-
Whether this animation is stopped at the end.
no setter
- isDismissed → bool
-
Whether this animation is stopped at the beginning.
no setter
- isForwardOrCompleted → bool
-
Whether the current aim of the animation is toward completion.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → AnimationStatus
-
The current status of this animation.
no setter
- value → T
-
The current value of the animation.
no setteroverride
Methods
-
addListener(
VoidCallback listener) → void -
Calls the listener every time the value of the animation changes.
override
-
addStatusListener(
AnimationStatusListener listener) → void - Calls listener every time the status of the animation changes.
-
drive<
U> (Animatable< U> child) → Animation<U> - Chains a Tween (or CurveTween) to this Animation.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
VoidCallback listener) → void -
Stop calling the listener every time the value of the animation changes.
override
-
removeStatusListener(
AnimationStatusListener listener) → void - Stops calling the listener every time the status of the animation changes.
-
toString(
) → String -
A string representation of this object.
override
-
toStringDetails(
) → String - Provides a string describing the status of this object, but not including information about the object itself.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited