Home > Software engineering >  flutter make widget collapse when scroll
flutter make widget collapse when scroll

Time:09-02

I want to make a container collapse (disappear) when scroll down, and expand (appear again) when scroll up. Just like the search bar in microsoft teams mobile.

I tried to do it using SliverAppBar and it worked but the ListView became lagging and had problems. Is there any way to do it without SliverAppBar?

enter image description here

CodePudding user response:

I think you should only replace AppBar Widget with SliverAppBar

hope I could help.

CodePudding user response:

You may check this library hidable

  • Related