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
priorOffsetsandcurrentOffsets. See TreeController.animateSlideFromOffsets for the full contract. -
cancelForKey(
TKey key) → void -
Cancels the slide for
key, if any. Tolerant of unregistered keys. Used by_cancelAnimationStateForSubtreeduring reparenting. -
clearAll(
) → void -
Resets every slide-related field back to its initial state and
disposes the ticker. Called from
TreeController._clear(and indirectly fromdispose). The next animateFromOffsets call recreates the ticker via the existing_ticker ??= ...pattern. -
clearForNid(
int nid) → void -
Defensive slot reset for
_adoptKeyand_releaseNid. Bounds-checks in case the engine's array hasn't grown tonidyet (rare but possible during initialization races). -
debugAssertConsistent(
) → void -
Verifies
_activeSlideNidsmirrors_slideByNidexactly. Throws StateError on inconsistency. Wrapped inassertat 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 guaranteenidis 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 guaranteenidis within range. -
dispose(
) → void -
Idempotent after clearAll. Implemented as a thin wrapper so the
controller's
disposecall 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 byTreeController._onStoreCapacityGrewin 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