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

[bug]: Router Navigation issue with iOs swipe back #1088

Open
kackogut opened this issue Mar 6, 2024 · 4 comments
Open

[bug]: Router Navigation issue with iOs swipe back #1088

kackogut opened this issue Mar 6, 2024 · 4 comments

Comments

@kackogut
Copy link

kackogut commented Mar 6, 2024

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:

  1. Create a new Stacked project
  2. Migrate to v2 Navigation: https://stacked.filledstacks.com/docs/stacked-router/routing-basics
  3. Ad navigation to a new screen without clearing the backstack
  4. 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

@FilledStacks
Copy link
Contributor

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.

@kackogut
Copy link
Author

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

@kackogut
Copy link
Author

@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.

@FilledStacks
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants