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.9k stars 479 forks source link

Fixed issue with closeProgressThreshold for smaller bottom sheets #440

Open bjartebore opened 5 days ago

bjartebore commented 5 days ago

When a ModalBottomSheets that due to its content is smaller than a full screen bottom sheet, the user has to move the dialog almost to the bottom of the screen before it dismisses. This is because the closeProgressThreshold calculates the threshold based on the viewport size and not the size of the rendered bottom sheet.

We need to adjust for this based on the height difference of the viewport and the rendered content within the bottom sheet dialog

Related issue: #421