After using the package for a while and attempting to have a different value for closeProgressThreshold, I noticed that the value passed in was not being reflected on the behaviour of the bottom sheet. So I dug in and found these.
willPopThreshold was deprecated in place of preventPopThreshold
preventPopThreshold is never used anywhere in the class state
(flingThreshold seems to be a more suitable name)
From the docs, it seems like what users are looking is closeProgressThreshold, but that's not true either because that is not the variable that is used to determine whether or not the bottom sheet should close. š (at least from what I noticed, closeProgressThreshold isn't really doing what it entails š¢ )
From the second snippet above it looks like what should be used here is widget.willPopThreshold and not the hardcoded _willPopThreshold but that doesn't help because the user can't change that anyway.
So it would only make sense that closeProgressThreshold replaces willPopThreshold
Let me know if this is all clear to grasp. It does seem all too coupled hence the bug.
Related issue (not much info there) #152
PR that attempted to fix but didn't reach the core #126
After using the package for a while and attempting to have a different value for
closeProgressThreshold
, I noticed that the value passed in was not being reflected on the behaviour of the bottom sheet. So I dug in and found these.1.
https://github.com/jamesblasco/modal_bottom_sheet/blob/e44458d2359565324e117bb3d41da04f5e60362e/modal_bottom_sheet/lib/src/bottom_sheet.dart#L48-L54
willPopThreshold
was deprecated in place ofpreventPopThreshold
preventPopThreshold
is never used anywhere in the class statecloseProgressThreshold
, but that's not true either because that is not the variable that is used to determine whether or not the bottom sheet should close. š (at least from what I noticed,closeProgressThreshold
isn't really doing what it entails š¢ )2.
https://github.com/jamesblasco/modal_bottom_sheet/blob/e44458d2359565324e117bb3d41da04f5e60362e/modal_bottom_sheet/lib/src/bottom_sheet.dart#L160-L161
widget.willPopThreshold
and not the hardcoded_willPopThreshold
but that doesn't help because the user can't change that anyway.closeProgressThreshold
replaceswillPopThreshold
Let me know if this is all clear to grasp. It does seem all too coupled hence the bug.