jamesblasco / modal_bottom_sheet

Flutter | Create advanced modal bottom sheets. Material, Cupertino or your own style
https://pub.dev/packages/modal_bottom_sheet
MIT License
1.86k stars 468 forks source link

Mis-sync with scrollcontroller when physics is AlwaysScrollableScrollPhysics #424

Open etaghiye opened 3 weeks ago

etaghiye commented 3 weeks ago

When dragging down the cupertino bottomsheet down the listview inside the bottomsheet also gets dragged down. The difference gets bigger as you drag down. Could we fix this and totally sync the behavior.

Also, in all good applications I have seen, when starting scrolling up the inner listview, when scroll is not at upper edge, it should not drag down the bottomsheet. The bottomsheet should get dragged down only when the scroll of its inner listview is at the upper edge. So if a user has the listview scrolled somewhere in the middle, and then wants to close the bottomsheet, he will need one tap and scroll up, then release the tap, and then do another tap and scroll up.

lucis-yg commented 2 weeks ago

I encountered the same issue, and I found that it was caused by the behavior of the physics, as it defaults to using BouncingScrollPhysics. So, I changed it to ClampingScrollPhysics, which indeed solved the aforementioned problem. However, this introduced a new issue: while I can drag down normally, when I try to drag back up, it immediately jumps to the top. This issue has been bothering me for two days.