1

I have SliverAppBar in my app with expandedHeight: 200,. Below it i have ListView that display content dynamically and can have different length. If ListView has 7 or more item its works perfecly, but if its below 7 items SliverAppBar still scrolls and has a lot of black space(screenshot). How can i disable SliverAppBar scroll property? I tried to use physics: NeverScrollableScrollPhysics(), in ListView itself, it didn't help.

enter image description here

IBlackVikingl
  • 643
  • 2
  • 7
  • 20

1 Answers1

3

Assuming you have a the SliverAppBar in a CustomScrollView or similar, you'll need to set the physics to NeverScrollableScrollPhysics() there as well.

Miguel Ruivo
  • 16,035
  • 7
  • 57
  • 87