CompoundAnimation<T> class abstract

An interface for combining multiple Animations. Subclasses need only implement the value getter to control how the child animations are combined. Can be chained to combine more than 2 animations.

For example, to create an animation that is the sum of two others, subclass this class and define T get value = first.value + second.value;

By default, the status of a CompoundAnimation is the status of the next animation if next is moving, and the status of the first animation otherwise.

Inheritance
Mixed-in types
Implementers

Constructors

CompoundAnimation({required Animation<T> first, required Animation<T> next})
Creates a CompoundAnimation.

Properties

first → Animation<T>
The first sub-animation. Its status takes precedence if neither are animating.
final
hashCode → int
The hash code for this object.
no setterinherited
isAnimating → bool
Whether this animation is running in either direction.
no setterinherited
isCompleted → bool
Whether this animation is stopped at the end.
no setterinherited
isDismissed → bool
Whether this animation is stopped at the beginning.
no setterinherited
isForwardOrCompleted → bool
Whether the current aim of the animation is toward completion.
no setterinherited
isListening → bool
Whether there are any listeners.
no setterinherited
next → Animation<T>
The second sub-animation.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → AnimationStatus
Gets the status of this animation based on the first and next status.
no setteroverride
value → T
The current value of the animation.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Calls the listener every time the value of the animation changes.
inherited
addStatusListener(AnimationStatusListener listener) → void
Calls listener every time the status of the animation changes.
inherited
clearListeners() → void
Removes all listeners added with addListener.
inherited
clearStatusListeners() → void
Removes all listeners added with addStatusListener.
inherited
didRegisterListener() → void
Called immediately before a status listener is added via addStatusListener.
inherited
didStartListening() → void
Called when the number of listeners changes from zero to one.
override
didStopListening() → void
Called when the number of listeners changes from one to zero.
override
didUnregisterListener() → void
Called immediately after a status listener is removed via removeStatusListener.
inherited
drive<U>(Animatable<U> child) → Animation<U>
Chains a Tween (or CurveTween) to this Animation.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Calls all the listeners.
inherited
notifyStatusListeners(AnimationStatus status) → void
Calls all the status listeners.
inherited
removeListener(VoidCallback listener) → void
Stop calling the listener every time the value of the animation changes.
inherited
removeStatusListener(AnimationStatusListener listener) → void
Stops calling the listener every time the status of the animation changes.
inherited
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.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited