sliver_tree/animation_style library
Value types configuring animation timing and easing for the sliver tree stack.
TreeAnimationSpec is one (duration, curve) pair. TreeAnimationStyle carries one spec per animation family:
- TreeAnimationStyle.expandCollapse: expand/collapse operation groups, bulk expandAll/collapseAll, and the scroll orchestrator's animated-concurrent mode gate.
- TreeAnimationStyle.enterExit: node enter/exit rows for insert and
remove. Inherits
expandCollapsewhen unset. - TreeAnimationStyle.reorderSlide: FLIP reorder slides (
moveNode,reorderRoots/reorderChildren,animateSlideFromOffsets, the drag-commit baseline). - TreeAnimationStyle.makeRoom: the drag make-room preview, meaning
gap open, re-target and release. Inherits
reorderSlidewhen unset. - TreeAnimationStyle.dropSettle: the drag proxy settle glides, for
the commit handoff and the cancel return. Inherits
reorderSlidewhen unset.
A family whose resolved spec has Duration.zero duration is OFF: it
snaps instead of animating, and that kill switch dominates explicit
per-call durations. TreeAnimationStyle.disabled turns every family
off, the canonical synchronous-test configuration. Every family
gates on its OWN resolved zero: in particular, dropSettle glides
run even when reorderSlide is zeroed (the drop commits instantly
and the card settles into its new slot).
The zero rule splits two meanings cleanly: a zero family CREATES no
motion (installs are refused; other families' in-flight animations
are untouched and re-base seamlessly across concurrent structural
changes), while DISABLING, meaning restyling reorderSlide to zero at
runtime, STOPS in-flight slide motion at the transition.
Classes
- TreeAnimationSpec
- A (duration, curve) pair for one animation family.
- TreeAnimationStyle
- Timing/easing for every animation family in the sliver tree stack.
Enums
- TreeAnimationFamily
- The animation families a TreeAnimationStyle carries. Declared at the site that installs an animation and never re-derived downstream.