SVGAAnimationController class
Drives playback of one MovieEntity.
It is an AnimationController, so forward, repeat, stop, value
and status listeners all work as usual; the duration is set from the
movie's frame count and frame rate when videoItem is assigned.
- Inheritance
-
- Object
- Listenable
- Animation<
double> - AnimationController
- SVGAAnimationController
Constructors
- SVGAAnimationController({required TickerProvider vsync})
Properties
- animationBehavior → AnimationBehavior
-
The behavior of the controller when AccessibilityFeatures.disableAnimations
is true.
finalinherited
- currentFrame → int
-
Index of the frame currently shown;
0when there is no movie.no setter - debugLabel → String?
-
A label that is used in the toString output. Intended to aid with
identifying animation controller instances in debug output.
finalinherited
- duration ↔ Duration?
-
The length of time this animation should last.
getter/setter pairinherited
- frames → int
-
Total number of frames;
0when there is no movie.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isAnimating → bool
-
Whether this animation is currently animating in either the forward or reverse 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
- isMute ↔ bool
-
Whether sound is silenced. The volume setting is kept.
getter/setter pair
- lastElapsedDuration → Duration?
-
The amount of time that has passed between the time the animation started
and the most recent tick of the animation.
no setterinherited
- lowerBound → double
-
The value at which this animation is deemed to be dismissed.
finalinherited
- reverseDuration ↔ Duration?
-
The length of time this animation should last when going in reverse.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → AnimationStatus
-
The current status of this animation.
no setterinherited
- upperBound → double
-
The value at which this animation is deemed to be completed.
finalinherited
- value ↔ double
-
The current value of the animation.
getter/setter pairinherited
- velocity → double
-
The rate of change of value per second.
no setterinherited
- videoItem ↔ MovieEntity?
-
The animation being played, or
null.getter/setter pair -
view
→ Animation<
double> -
Returns an Animation<double> for this animation controller, so that a
pointer to this object can be passed around without allowing users of that
pointer to mutate the AnimationController state.
no setterinherited
- volume ↔ double
-
Volume of the animation's sound, from
0.0to1.0.getter/setter pair
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
-
animateBack(
double target, {Duration? duration, Curve curve = Curves.linear}) → TickerFuture -
Drives the animation from its current value to the given target, "backward".
inherited
-
animateBackWith(
Simulation simulation) → TickerFuture -
Drives the animation according to the given simulation with a status of
AnimationStatus.reverse.
inherited
-
animateTo(
double target, {Duration? duration, Curve curve = Curves.linear}) → TickerFuture -
Drives the animation from its current value to the given target, "forward".
inherited
-
animateWith(
Simulation simulation) → TickerFuture -
Drives the animation according to the given simulation.
inherited
-
clear(
) → void - Blanks the canvas until the animation moves to another frame.
-
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
-
didUnregisterListener(
) → void -
Called immediately after a status listener is removed via removeStatusListener.
inherited
-
dispose(
) → void -
Release the resources used by this object. The object is no longer usable
after this method is called.
override
-
drive<
U> (Animatable< U> child) → Animation<U> -
Chains a Tween (or CurveTween) to this Animation.
inherited
-
fling(
{double velocity = 1.0, SpringDescription? springDescription, AnimationBehavior? animationBehavior}) → TickerFuture -
Drives the animation with a spring (within lowerBound and upperBound)
and initial velocity.
inherited
-
forward(
{double? from}) → TickerFuture -
Starts running this animation forwards (towards the end).
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
-
repeat(
{double? min, double? max, bool reverse = false, Duration? period, int? count}) → TickerFuture -
Starts running this animation in the forward direction, and
restarts the animation when it completes.
inherited
-
reset(
) → void -
Sets the controller's value to lowerBound, stopping the animation (if
in progress), and resetting to its beginning point, or dismissed state.
inherited
-
resync(
TickerProvider vsync) → void -
Recreates the Ticker with the new TickerProvider.
inherited
-
reverse(
{double? from}) → TickerFuture -
Starts running this animation in reverse (towards the beginning).
inherited
-
stop(
{bool canceled = true}) → void -
Stops running this animation.
override
-
toggle(
{double? from}) → TickerFuture -
Toggles the direction of this animation, based on whether it isForwardOrCompleted.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
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