[bug]: Router Navigation issue with iOs swipe back
Opened this issue · 4 comments
Describe the bug
After migration to v2 Navigation using guide: https://stacked.filledstacks.com/docs/stacked-router/routing-basics iOs swipe back navigation is not working. Swipe back on iOs does nothing and the screen remain the same. After switching back to v1 Navigation, swipe back is working correctly
To reproduce
Steps to reproduce:
- Create a new Stacked project
- Migrate to v2 Navigation: https://stacked.filledstacks.com/docs/stacked-router/routing-basics
- Ad navigation to a new screen without clearing the backstack
- Launch the app on iOs and try to swipe back after navigating to a new screen
Expected behavior
App is navigating back to previous screen
Screenshots
No response
Additional Context
No response
Hey,
Thanks for the issue.
I'm assuming you're building for Web first and mobile after?
The navigator2 is mostly for web apps, we definitely haven't tested much the native behaviour for different platforms.
This would be fixed by not using a custom route, which will add back the iOS transition to web, which you can then disable.
Change your routes to Cupertino or Material routes and the functionality should come back. Then disable those transitions on web.
Hi!
Thanks for your response! We are not really building app with the web support, but we decided to use Navigator2 as it was recommended in some doc and we thought that it's the more recent solution to which all apps should navigate if possible at some point.
Changing CustomRoute
to CupertinoRoute
was our first solution, but unfortunately it didn't help, the only thing that made it work was to change Router
back to Navigation1
@FilledStacks any news on that one? We are wondering if we should migrate back to Navigation1 which was the only thing that fixed the issue. But it will be unfortunate, since we want to add web support soon so we might turn up in the same point.
Hey,
No we haven't looked at that. We still build with Navigator1, unless we're building web first.
I don't really recommend Navigator 2 for mobile apps, even though it's hidden in the Stacked implementation I still don't like it.
Cupertino route should fix it, but I haven't tested a Flutter web specific code base on an iOS device so I haven't experienced it myself.