AnimationState class

Animation state for a single node (standalone animations only).

Only nodes animating individually through StandaloneAnimator, an enter or an exit, carry a stored AnimationState. Expand/collapse groups track per-node extents in NodeGroupExtent, and bulk operations (expandAll/collapseAll) track keys directly in AnimationGroup sets. The stored state is dropped once the animation completes.

Constructors

AnimationState({required AnimationType type, required TreeAnimationFamily family, required double startExtent, required double targetExtent, double progress = 0.0, Object? triggeringAncestorId, double speedMultiplier = 1.0})

Properties

currentExtent ↔ double
The interpolated current extent.
getter/setter pair
family → TreeAnimationFamily
The animation family whose style spec times this state. Declared at the install site and never re-derived downstream; the standalone ticker resolves it through the live style on every tick. Required (no default) so a new install site cannot silently inherit the wrong family.
final
hashCode → int
The hash code for this object.
no setterinherited
isComplete → bool
Whether this animation has completed.
no setter
progress ↔ double
Animation progress from 0.0 to 1.0.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
speedMultiplier → double
Speed multiplier for proportional timing on cross-group transitions. Values > 1.0 make the animation complete proportionally faster.
final
startExtent ↔ double
The extent (height) at animation start. Mutable to allow updates when the actual size is measured.
getter/setter pair
targetExtent ↔ double
The extent (height) at animation end. Mutable to allow updates when the actual size is measured.
getter/setter pair
triggeringAncestorId → Object?
If this animation was triggered by an ancestor expanding/collapsing, this is that ancestor's ID. Used to coordinate grouped animations.
final
type → AnimationType
The type of animation.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
updateExtent([Curve curve = Curves.linear]) → void
Updates currentExtent based on progress and an optional curve.

Operators

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