- Flutter app bar + tab bar with hide on scroll functionality
Please see this stackoverflow question.
- MaterialApp
- DefaultTabController
- Scaffold
- NestedScrollView
- SliverAppBar
- TabBar
- TabBarView
- SliverAppBar
- NestedScrollView
- Scaffold
- DefaultTabController
- I have to set the
snapof theSliverAppBartotrue. Without this, the application bar will not show when I scroll back up.
Although this is works, it is not the behaviour I am looking for. I want the application bar to show smoothly (similar to WhatsApp) rather than coming into view even if you scroll very little.
- When I scroll down and change tabs, a little bit of the content is cut out of view.
Below is a GIF showing the behaviour:
DefaultTabControllerNestedScrollViewSliverAppBarTabBar+TabBarView
