You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Juliotati
changed the title
Invalid/unused API's on closeProgressThreshold and preventPopThreshold
[modal_bottom_sheet]: Invalid/unused API's on closeProgressThreshold and preventPopThresholdJun 21, 2024
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.
modal_bottom_sheet/modal_bottom_sheet/lib/src/bottom_sheet.dart
Lines 48 to 54 in e44458d
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.
modal_bottom_sheet/modal_bottom_sheet/lib/src/bottom_sheet.dart
Lines 160 to 161 in e44458d
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.
The text was updated successfully, but these errors were encountered: