sliver_tree/_slide_animation_engine library

Internal: paint-only FLIP slide engine for TreeController.

Owns every piece of slide state — the per-nid slide map, the active-set working list, the shared Ticker driving progress, and the lifecycle. The controller holds a single instance and exposes thin delegators for the public surface (TreeController.animateSlideFromOffsets, TreeController.getSlideDelta, etc.).

Slide is paint-only: it does not change layout, sticky geometry, or extent animations. The engine fires its onTick callback (typically TreeController._notifyAnimationListeners) on every tick so the render object's animation-listener takes the slide branch and schedules markNeedsPaint.

Why a raw Ticker and not an AnimationController: a ticker's callbacks fire exclusively from the scheduler's transient-callbacks phase (next vsync after Ticker.start). This means animateFromOffsets can be invoked from inside RenderObject.performLayout — the listener chain reaches the sliver element's _onAnimationTick only from the next vsync, when markNeedsLayout/markNeedsPaint are legal. An AnimationController fires listeners synchronously from its value= setter, so starting it mid-layout would trip _debugCanPerformMutations.

Per-slide timing: each SlideAnimation tracks its own slideStartElapsed (the Ticker.elapsed value at install / composition / re-baseline) and slideDuration. The shared ticker runs continuously while any slide is active and is NOT reset per-batch — per-slide progress in _onSlideTick derives from (elapsed - entry.slideStartElapsed) / entry.slideDuration. This allows multiple concurrent slides with different durations to progress at their own rates, and lets slides marked SlideAnimation.preserveProgressOnRebatch continue uninterrupted across un-touching batches (used by the render layer for active edge-ghost and exit-phantom slides).

Not exported from the package barrel; used only by TreeController.

Classes

SlideAnimationEngine<TKey>
Paint-only FLIP slide engine. See library docs.