I have a ListView
with shrinkWrap: true
.
Also, I have applied BouncingScrollPhysics()
to the ListView
The problem is bounce physics only works at the bottom of ListView
. When I scroll to the top, it doesn't show the bounce effect.
I have a ListView
with shrinkWrap: true
.
Also, I have applied BouncingScrollPhysics()
to the ListView
The problem is bounce physics only works at the bottom of ListView
. When I scroll to the top, it doesn't show the bounce effect.
You can try this:
SingleChildScrollView(
physics: BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
child: Column(...),
)
I had the same problem, I just used physics: AlwaysScrollableScrollPhysics(parent: BouncingScrollPhysics())
BouncingScrollPhysics()
does not always work if the ListView
is not 'full'. For example if the ListView
needs 5 items to fill its view and become scrollable, then the BouncingScrollPhysics()
will probably only work when the ListView
contains 5 or more items.
Try using NeverScrollableScrollPhysics into the ListView.builder.
But first set the bouncing scroll physics:
child: SingleChildScrollView(
physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
And in the ListView use both shrinkWrap and physics:
ListView.builder(
shrinkWrap: true, physics: const NeverScrollableScrollPhysics(),
if above Functions are not works you should use this one physics: BouncingScrollPhysics(),