7
votes

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

2
Not clear. Considering you have your tabbar replacing the title, I don't understand how you can collapse the appbar - Rémi Rousselet
The AppBar title holds the TabBar. So the AppBar could collapse when scrolling to gain that area for reading the chat. Does that answer it? - Ride Sun
But your scroll is bottom to top - Rémi Rousselet
yes, correct it is - Ride Sun

2 Answers

1
votes

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.