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
- 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 — mirrors
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(
TKey key) → bool -
Whether
keyis 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
nidis 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
sentinel cast to
TKey— no allocation per call. Safe to cache once per controller. Soundness: every field on the sentinel that depends onTKeyis 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.