The Sacred Scrolls: Crafting Your Own Slivers
summary
Built a lazy version of a sliver that converts an existing expansion-tile sliver into an on‑demand renderer using SliverMultiBoxAdapter and the child manager methods addInitialChild, insertAndLayoutLeadingChild / insertAndLayoutChild, plus collectGarbage and calculateLeading/TrailingGarbage. ParentData stores childExtent/totalExtent/nextLayout; final layout sets SliverGeometry (scroll/layout/paint/maxPaint extents). Demo shows 7 total children but only 1 laid out until expansion expands to 7 and collapsing returns to 1; code on branch lazy sliver.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:50Custom slivers in Flutter
- 5:10Sliver constraints and parent data
- 8:06When to build custom slivers
- 9:08SliverMultiBoxAdapter
- 12:00Lazy sliver children states
- 13:45Lazy sliver layout steps
- 20:40Live demo: lazy sliver expansion tile
- 23:15Summary
related talks
26mMastering Custom Slivers in Flutter
40mConquering RenderSliver: Harnessing Power, Overcoming Fear
43mPerformant Scrolling Layouts With Slivers
01h 03mThat's how we scroll in Flutter
55mSliver in Flutter, or How Scrolling Works
35mHow Custom RenderObjects can make your life easier
47mLive-Coding Custom Widgets with Simon
35mUnder the Hood of ScrollViews
