Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to collapse the main AppBar with multiple Tabs in the body

Tags:

flutter

I have the following setup in futter as shown in the picture. The Scaffold->AppBar->TabBarView-> Than multiple tabs and in the first Tab a ListView for the chat.

I would like that the main AppBar is completely collapsing as long the user scrolls up. I am aware of the SliverAppBar in flutter but don't know how that would translate to this use case where I have multiple Tabs. When the user starts navigating to another tab the Appbar should simply show again and if the second Tab has also a ListView it should listen to that ListView.

enter image description here

like image 645
Ride Sun Avatar asked Dec 22 '17 22:12

Ride Sun


1 Answers

I'm not sure I exactly understand the description, but it sounds like what you're looking for is NestedScrollView.

On the website there is sample code for SliverAppBar used with NestedScrollView.

like image 185
Ian Hickson Avatar answered Oct 09 '22 02:10

Ian Hickson