Flutter Slivers Overview: SliverAppBar, SliverPersistentHeader
Why Stack Overflow recommends it
Stack Overflow users link it when explaining how SliverAppBar and SliverPersistentHeader differ and how to build custom collapsing headers with a SliverPersistentHeaderDelegate.
Recommended by 4 people across 3 different months, 2019 to 2021.
What it is
A 5-minute Flutter tutorial by Andrea Bizzotto introducing slivers, with a walkthrough of SliverAppBar and a more detailed look at SliverPersistentHeader. It comes with a demo repository on GitHub and timestamped sections.
What people said
Recommends Ashar · 2020-07 · Stack Overflow · on “How to make curved bottom appBar in Flutter?”
I built something similar with a CustomScrollView and SliverPersistenHeader, to get the curved effect your header can have a maxExtent and minExtent. When not scrolled the header height will show the curve otherwise when you start scrolling it will also shrink to a set height. You can check out this tutorial [this video] from around 2:50 to get an idea of how to implement the header and then design your background containers accordingly.
Recommends David Sedlář · 2020-10 · Stack Overflow · on “How to create SliverAppBar with bottom”
Try to implement your own SliverPersistentHeader via SliverPersistentHeaderDelegate. This video nicely and briefly show its implementation for custom SliverAppBar. [this video] . I also needed to create custom SliverAppBar and was able to achieve that with this. In your case, you need to calculate borders, and some positions only based on AppBar offset as shown in video.
Recommends Ravindra S. Patil · 2021-12 · Stack Overflow · on “what is the difference between SliverAppBar and SliverPersistentHeader in Flutter?”
SliverAppBar : SliverAppBar is a Material Design widget in flutter which gives scrollable or collapsible app-bar. The word Sliver is given to scrollable areas here. SliverAppBar basically gives us means to create an app-bar that can change appearance, blend in the background, or even disappear as we scroll. SliverPersistentHeader : A sliver whose size varies when the sliver is scrolled to the edge of the viewport opposite the sliver's GrowthDirection . In the normal case of a CustomScrollView with no centered sliver, this sliver will vary its size when scrolled to the leading edge of the viewport. See this [this video] Video also. for SliverAppBar and SliverPersistentHeader Refer SliverAppBar her
Recommends darshan · 2021-12 · Stack Overflow · on “what is the difference between SliverAppBar and SliverPersistentHeader in Flutter?”
`SliverPersistentHeader` can be used to create a `SliverAppBar` with custom behavior. Check the link for more info: [this video]
Cites user9836706 · 2019-09 · Stack Overflow · on “Flutter web: SliverPersistentHeader behavior”
I'm following this tutorial [this video] , but using flutter web I came across this issue with my code: @override Widget build(BuildContext context) { final Size _size = MediaQuery.of(context).size; return Center( child: Container( height: _size.height, width: maxWidth(_size), color: indigo, child: CustomScrollView( slivers: <Widget>[ SliverPersistentHeader( pinned: true, floating: true, delegate: SliverHeaderDelegate( minExtent: _size.height*0.1, maxExtent: _size.height*0.5),), SliverFillRemaining() ],),),);}} where the header delegate is: class SliverHeaderDelegate implements SliverPersistentHeaderDelegate { SliverHeaderDelegate({ this.minExtent, @required this.maxExtent, }); final double minEx