BulkAnimationData<TKey> class

Snapshot of the controller's bulk-animation state at a single point in time, fetched as one unit so render-layer hot paths can avoid the four separate getter calls (isBulkAnimating, bulkAnimationValue, bulkAnimationGeneration, isBulkMember) that would otherwise be needed each layout.

isValid is true exactly when a bulk animation group exists and has active members. Read value / generation / containsMember only on a valid snapshot: on an invalid snapshot they hold zero defaults.

Properties

generation → int
Monotonic counter that bumps whenever the bulk group is created, destroyed, or its member set changes. Render-layer caches keyed by position-indexed cumulatives use this as the staleness signature.
final
hashCode → int
The hash code for this object.
no setterinherited
isCollapsing → bool
Whether this group is COLLAPSING (collapseAll) rather than expanding (expandAll). Direction is uniform per group by construction; see the four writer sites in TreeController (expandAll's fresh-group and reverse-a-collapsing-group branches, collapseAll's fresh-group and reverse-an-expanding-group branches).
no setter
isValid → bool
Whether a bulk animation group is currently active. When false, every other field carries a zero / empty default.
final
memberCount → int
Live member count on the source group, mirroring AnimationGroup.memberCount. Does not add pendingRemoval, since collapse paths populate both sets with overlapping keys (the to-be-removed members are also live during the animation). Callers that need a per-key membership check should use containsMember.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → double
Curved animation value (0..1) for the bulk group. Zero on an invalid snapshot.
final

Methods

containsMember(Object? key) → bool
Whether key is a member of the bulk group (in either the live member set or the pending-removal set). Always false on an invalid snapshot.
containsMemberNid(int nid) → bool
Nid-keyed equivalent of containsMember: O(1) array read instead of HashMap probe. Always returns false on an invalid snapshot. Caller must guarantee nid is live.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

inactive<TKey>() → BulkAnimationData<TKey>
The "no bulk animation active" snapshot. Returns a const-shared BulkAnimationData<Never> cast to BulkAnimationData<TKey>, so it allocates nothing per call and is safe to cache once per controller. Soundness: every field on the sentinel that depends on TKey is null, so containsMember never inspects the cast set.
snapshot<TKey>({required double value, required int generation, required Set<TKey> members, required Set<TKey> pendingRemoval, required Uint8List bulkMemberByNid}) → BulkAnimationData<TKey>
Constructs a snapshot from the controller's current bulk state. Internal use only: call TreeController.bulkAnimationData. Holds references to the underlying sets; does not copy or union them, so no per-frame allocation beyond the snapshot record itself.