AnimationQueueController class

A controller that manages a queue of animation requests.

This class extends ChangeNotifier and provides a way to queue multiple animations that execute sequentially or replace the current queue. It handles timing via tick calls and notifies listeners of value changes.

Overview

Use AnimationQueueController when you need to chain multiple animations or dynamically add/remove animation steps. Call tick regularly (e.g., in a ticker or animation frame callback) to progress the animations.

Example

final controller = AnimationQueueController(0.0);

// Queue animations
controller.push(AnimationRequest(0.5, Duration(milliseconds: 200), Curves.easeIn));
controller.push(AnimationRequest(1.0, Duration(milliseconds: 300), Curves.easeOut));

// In ticker
controller.tick(deltaTime);
Inheritance

Constructors

AnimationQueueController([double _value = 0.0])
Creates an animation queue controller with an optional initial value.

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldTick bool
Checks if there are pending animations or an active runner.
no setter
value double
Gets the current animation value.
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
push(AnimationRequest request, [bool queue = true]) → void
Adds an animation request to the queue or replaces the current queue.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
tick(Duration delta) → void
Advances the animation by the given time delta.
toString() String
A string representation of this object.
inherited

Operators

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