sliver_tree/_sticky_header_computer library
Internal: sticky-header layout helper for RenderSliverTree.
Owns every piece of state that exists solely to compute and cache sticky-header positions: the precompute scratch arrays and the nid-indexed sticky lookup. Kept out of the render object so the sticky logic is testable in isolation by feeding precomputed offsets and extents in directly.
The set is recomputed on EVERY layout, with no throttle, and adding one would be a mistake: skipping frames during an animation serves a WRONG band rather than a slightly stale one, because every extent moves each frame and the candidate probe reads those extents.
Classes
-
StickyHeaderComputer<
TKey, TData> - Computes sticky headers and owns the scratch state required for the computation. The owning render object hands in the per-frame inputs (visible nodes, layout-space offsets and extents, scroll position) and reads back the computed headers / infoForNid for paint, hit-test, and transform.
Typedefs
- FindFirstVisibleIndex = int Function(double scrollOffset)
- Resolves a scroll offset to the first visible-position index whose row's bottom edge is past it.