-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add swipe dismiss sensitivity params for modals #222
feat: add swipe dismiss sensitivity params for modals #222
Conversation
[Notion task](https://www.notion.so/leftclick/Fix-get-started-e324d9a0be544b2ea35e8634820d0fdc) This PR uses our [custom version](fujidaiti/smooth_sheets#222) of smooth_sheets lib. So that we could control the `minFlingVelocityToDismiss` and `minDragDistanceToDismiss` dismiss params. Also this PR sets all font letter spacing to `0` (to make fonts look exactly like in figma) - keep that in mind because that might change the markdown in some places.
Awesome! But I think it would make more sense to add a DismissConfig (or similar) that contains the both values. At least that is how the other configs get encapsulated as far as I can tell. |
Add minFlingVelocityToDismiss and minDragDistanceToDismiss params for CupertinoModalSheetPage, CupertinoModalSheetRoute, ModalSheetPage and ModalSheetRoute classes
2d7e899
to
9b860b8
Compare
Good point! @appinteractive check the changes please, added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution! It looks generally good, but there are a few points I'd like to discuss before we merge this PR.
rename SwipeDismissConfig to SwipeDismissSensitivity remove toString, ==, hashCode methods
2076293
to
fdceb2c
Compare
Can you also make the following changes?
|
@fujidaiti Done, check please |
This reverts commit a9a1c80.
I renamed |
@fujidaiti In our project, we even set the |
@ice-orion Thank you! I'll resolve the conflicts and add some tests this weekend. |
# Conflicts: # lib/src/modal/swipe_dismiss_sensitivity.dart
@ice-orion I changed the default |
414558b
to
91c0be3
Compare
Description
Thank u for the great lib!
The PR adds
SwipeDismissConfig
class that can be passed toCupertinoModalSheetPage
,CupertinoModalSheetRoute
,ModalSheetPage
andModalSheetRoute
classes to configure min swipe velocity and distance for a swipe to result in a dismissal.