SlideAnimationEngine<TKey> class

Paint-only FLIP slide engine. See library docs.

Constructors

SlideAnimationEngine({required TickerProvider vsync, required NodeIdRegistry<TKey> nids, required VoidCallback onTick})

Properties

hasActive bool
no setter
hasActiveX bool
Whether any active slide entry is animating horizontally (startDeltaX != 0). Lets render-layer hot paths skip per-row X-delta reads when no X-axis work is in flight.
no setter
hashCode int
The hash code for this object.
no setterinherited
maxAbsDelta double
Maximum |currentDelta| across every active slide entry, or 0.0 when no slides are active.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

animateFromOffsets(Map<TKey, ({double x, double y})> priorOffsets, Map<TKey, ({double x, double y})> currentOffsets, {required Duration duration, required Curve curve, required bool structuralAnimationsDisabled, double maxSlideDistance = double.infinity}) → void
Installs FLIP slides for every node whose offset changed between priorOffsets and currentOffsets. See TreeController.animateSlideFromOffsets for the full contract.
cancelForKey(TKey key) → void
Cancels the slide for key, if any. Tolerant of unregistered keys. Used by _cancelAnimationStateForSubtree during reparenting.
clearAll() → void
Resets every slide-related field back to its initial state and disposes the ticker. Called from TreeController._clear (and indirectly from dispose). The next animateFromOffsets call recreates the ticker via the existing _ticker ??= ... pattern.
clearForNid(int nid) → void
Defensive slot reset for _adoptKey and _releaseNid. Bounds-checks in case the engine's array hasn't grown to nid yet (rare but possible during initialization races).
debugAssertConsistent() → void
Verifies _activeSlideNids mirrors _slideByNid exactly. Throws StateError on inconsistency. Wrapped in assert at call sites so release builds skip it.
deltaForKey(TKey key) double
Slide delta for key, or 0.0 if not currently sliding (or not registered).
deltaForNid(int nid) double
Slide delta for the live nid, or 0.0 if not currently sliding. Caller must guarantee nid is within range.
deltaXForKey(TKey key) double
X-axis slide delta for key, or 0.0 if not currently sliding (or not registered).
deltaXForNid(int nid) double
X-axis (cross-axis indent) slide delta for the live nid, or 0.0 if not currently sliding. Caller must guarantee nid is within range.
dispose() → void
Idempotent after clearAll. Implemented as a thin wrapper so the controller's dispose call site is in place even when no extra work is needed.
markPreserveProgress(TKey key) → void
Sets SlideAnimation.preserveProgressOnRebatch = true on the slide entry for key. Tolerant of unregistered keys and inactive slides (no-op).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resizeForCapacity(int nidCapacity) → void
Grows the per-nid slide array to match nidCapacity. Called by TreeController._onStoreCapacityGrew in lockstep with every other per-nid array. New slots default to null (not sliding).
toString() String
A string representation of this object.
inherited

Operators

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