sliver_tree/_viewport_snapshot library
Immutable per-frame viewport state shared between the render layer and the slide composer. Owns the predicates the slide pipeline uses to classify rows as "visible" / "meaningfully visible" / "past an edge," so capture-time vs current-time questions can be expressed in terms of two snapshots instead of ad-hoc scroll-offset arithmetic.
Lives in its own file (rather than inside render_sliver_tree.dart)
so both the render layer and the slide composer can import it without
a backward dependency between them.
Classes
- ViewportSnapshot
- Immutable record of the slide-pipeline-relevant viewport state at a single moment in time: the scroll offset, the sliver's paint extent, and the current overhang setting. Owns every viewport-derived value the slide pipeline reads (top/bottom, overhang-adjusted edge bases), so capture-time vs current-time questions can be expressed in code instead of dropping into ad-hoc scroll-offset arithmetic.
Enums
- ViewportEdge
- Which side of the viewport an edge ghost is anchored to.