The Sliver widgets in Flutter might be the most slept-on tool for building scroll-driven UIs in the whole framework
What they do is let you build custom scrollable layouts where each child controls its own scroll behavior and geometry. That might not sound like a big deal but it is — because it means you can have headers that pin, sections that shrink, and lists that collapse all in one scroll view without hacking anything together. Its performant in a way that most nested scroll approches aren’t.
I think the reason nobody uses them is the API looks kind of intimadating at first. You implement a SliverPersistentHeaderDelegate and override build and maxExtent and minExtent, and your dealing with shrinkOffset and overlap values to drive your UI. Coming from ListView brain it feels foriegn. But once it clicks it clicks.
stuff like collapsing app bars with custom content, sticky section headers, parallax hero images at the top of a scroll view — anything where you’ve got scroll-driven UI that needs to feel native and smooth. people oftentimes reach for NestedScrollView with a bunch of workarounds for this kind of thing and it works but Slivers are doing it cleaner and cheaper under the hood.
Honestly the Flutter docs don’t do it any favors. The example they give is not exactly inspiring. But if you go look at how the actual Flutter team uses it internally (SliverAppBar is built on it) that’s where it starts to make sense.
Anyway if ya’ll never looked at it, worth 20 minutes. Might save you from a janky NestedScrollView solution next time you need somthing like this. I personally didn’t know about this until recently
Has anyone actually used custom Slivers in a real project??? Curious what the use case was. And are there other widgets like this that feel to intimidating on the surface but are worth digging into?”