Skip to content
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

Issue with back button gesture on Nokia (maybe bug maybe feature) #13

Closed
zim32 opened this issue May 26, 2021 · 3 comments · Fixed by #14 · May be fixed by zim32/swipeable_page_route#1
Closed

Issue with back button gesture on Nokia (maybe bug maybe feature) #13

zim32 opened this issue May 26, 2021 · 3 comments · Fixed by #14 · May be fixed by zim32/swipeable_page_route#1
Labels
T: Feature Type: :tada: New Features

Comments

@zim32
Copy link
Contributor

zim32 commented May 26, 2021

Hi. First of all thanks to your work. Plugin is awesome.
But I noticed some issue which leads to poor user experience.

I have Android Nokia phone, which does not have back button, instead it uses swipes from the edge of screen to navigate back.
So when I want for example to go back and try to swipe from left to right and start swiping close to the left screen edge, builtin Nokia swipe detection activates and this plugin also begin to swipe.

And this leads to double back and application closes. I think the solution here is will be to specify how far from edge the swipe must begin to activate navigation.

Porosal

Something like that can help

return SwipeablePageRoute(
    builder: (context) => SomePageWIdget(),
    canOnlySwipeFromEdge: true,
    backGestureDetectionWidth: 150,
    minEdgeOffset: 50 // imaginary param
);

This gives some imaginary vertical line which starts at 50 from left, have width of 100 and ends at 150 from left.
And this will prevent simultaneous activation of builtin back button and this plugin.

@zim32
Copy link
Contributor Author

zim32 commented May 26, 2021

See this link for description
https://developer.android.com/training/gestures/gesturenav

@JonasWanke
Copy link
Owner

Thanks for filing this issue (and creating the PRs!) and sorry for the delayed response.

I tried to reproduce this issue on my OnePlus phone where I also swipe from the edge to go back in every app but wasn't able to reproduce this problem. When swiping from the edge, the OS detects this gesture directly and Flutter doesn't receive pointer events at all, hence only one back navigation is performed.

I can still include the suggested minEdgeOffset parameter, but it should be used with care: Its value has to precisely match the OS configuration to avoid the problem you mentioned while not creating a gap between the OS's and app's gesture detection areas. Also, the behavior apparently differs between devices…

@zim32
Copy link
Contributor Author

zim32 commented Jun 8, 2021

This is really strange. In my nokia I have stock android. Maybe your phone have another implementation of this feature... I will try to make a video of this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Feature Type: :tada: New Features
Projects
None yet
2 participants