API ReferenceNavigation & Scrolling
SliverList
Lazy list sliver with fixed, varied, and prototype extents.
Everything here implements the Sliver trait (build, create_render_sliver).
The retained viewport materializes only the visible range plus a bounded cache.
use incular::prelude::*;
fn main() {
let app = Application::new(|_cx| {
CustomScrollView::new(vec![
Box::new(SliverList::builder(10, |i| {
Text::new(format!("row {i}"))
})) as Box<dyn Sliver>,
]).into()
})
.expect("valid application");
incular::run(app).expect("run application");
}| Type | Extent strategy |
|---|---|
SliverList | Builder rows, estimated extents |
SliverFixedExtentList | Uniform extent, direct division math |
SliverVariedExtentList | Per-index extent function |
SliverPrototypeExtentList | Extents from a measured prototype |
SliverLayout | Geometry + materialized children of one layout pass |
Fixed extents derive ranges by division; variable extents learn exact sizes from laid-out children and compensate the visible anchor when rows above change size.
Related: SliverGrid,
CustomScrollView,
ListView.