-
Notifications
You must be signed in to change notification settings - Fork 50
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
Is there an easy way to do a swipe to dismiss like the twitter app? #14
Comments
An ticket asked for swipe-to-dismiss (#14) It's easy to implement and now supported with the `swipeDismissable` argument. This allows the user to drag the dialog down to dismiss it. However, this is still WIP because when the user has zoomed in, you can't pan the image anymore because the Dismissable widget begins to dismiss. Will have to address this in a future commit.
I got stuck on a problem with the PageView/PageController. I filed an issue here: flutter/flutter#106708 and asked a question here: https://stackoverflow.com/questions/72779464/flutter-pageview-seems-to-ignore-pagecontrollers-page-property-after-setstate I hope it can be solved. |
@mark8044 I've filed another issue here: flutter/flutter#108961 |
A ticket asked for swipe-to-dismiss (#14) It's easy to implement and now supported with the `swipeDismissible` argument. This allows the user to drag the dialog down to dismiss it. Initially there was a problem when the user zoomed in and tried to pan around on the zoomed-in image: The `Dismissible` widget's GestureDetector would take over and enter the dismissal animation. Watching the image's scale and then changing the Dismissible's `dismissDirection` from `down` to `none` solves the issue. However, additionally a `GlobalObjectKey` was needed for the PageView because Dismissible changes the location of the widget in the widget tree when its `dismissDirection` is changed to `none`. See https://github.com/flutter/flutter/blob/2aa348b9407e96ffe4eca8e8f213c7984afad3f7/packages/flutter/lib/src/widgets/dismissible.dart#L692 See flutter/flutter#108961 See https://www.youtube.com/watch?v=kn0EOS-ZiIc
Found a solution: #21 |
As the title says, is there a good way to allow us to swipe the image up or down (but not diagonally) to dismiss the image?
The text was updated successfully, but these errors were encountered: