Flutter ListView bounces at the bottom but not on the top (iOS)

Viewed 1093

I have an app that contains a Widget which presents a ListView.builder with some custom Widgets in it (dynamic length).

For some reason, the list bounces perfectly fine on the bottom (over-scroll in the bottom), but does not bonce at the top (on over-scroll in the top).

I've tried to add this line of code:

physics: AlwaysScrollableScrollPhysics( parent: BouncingScrollPhysics() ),

as well as this one:

physics: BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics() ),

But none of them worked.

Does anyone know how can I make the list bounce on both sides?

2 Answers

Without actually seeing your code, it seems like you're using shrinkWrap: true property in your ListView which is preventing it to overscroll on the top (bottom works though).

If that's the case, your better bet is to use a Column wrapped in a SingleChildScrollView. Here's the minimal code:

SingleChildScrollView(
  physics: BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
  child: Column(),
)
Related