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 per-frame throttle counter, the last-computed-at scroll offset, the precompute scratch arrays, and the nid-indexed sticky lookup. Extracted from the render object so the sticky logic is testable in isolation by feeding precomputed offsets and extents in directly.

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.