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.
Asked
Active
Viewed 2,162 times
1

IBlackVikingl
- 643
- 2
- 7
- 20
1 Answers
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
-
2I don't know how i didn't notice parent NestedScrollView, it worked, thanks – IBlackVikingl Aug 12 '21 at 14:18
-
3How i said above, i have NestedScrollView. I added physics: NeverScrollableScrollPhysics(), but it didn't prevent me from scrolling – IBlackVikingl Aug 12 '21 at 14:44