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

Consider using back_button_interceptor #102

Open
flodaniel opened this issue Aug 25, 2022 · 3 comments
Open

Consider using back_button_interceptor #102

flodaniel opened this issue Aug 25, 2022 · 3 comments

Comments

@flodaniel
Copy link

flodaniel commented Aug 25, 2022

Is your feature request related to a problem? Please describe.

Currently flow_builder implementation has a conflict with packages that use the back_button_interceptor package, because both use the method SystemChannels.navigation.setMethodCallHandler to listen to navigation events. This causes the onGeneratePages callback to no longer being called on android back button navigation in certain scenarios.

Describe the solution you'd like
A clear and concise description of what you want to happen.
As the implementation of back_button_interceptor is lightweight and stable (nearly no open issues, version 6), I propose using it instead of relying on the own interceptor implementation. This resolves any conflicts and results in less code to maintain for flow_builder.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Sadly, I was unable to find a solution to merge to calls to the SystemChannels.navigation.setMethodCallHandler API. If that is somehow possible, this would also be a viable option.

Additional context
Add any other context or screenshots about the feature request here.
I discovered the bug when working with the loader_overlay package. Initially I filled a bug report there. After discovering the conflict, I filled a bug report with back_button_interceptor here. The maintainer confirmed the conflict, but declined to work on a possible solution, as they are not using flow_builder.

@chillbrodev
Copy link

@felangel We really need a fix for this as it is impacting usage of FlowBuiler on Flutter Web. We can see that the MethodCall of pushRouteInformation is being swallowed by the _handleSystemNavigation function. This prevents navigation from working when utilizing GoRouter
image

@RootSoft
Copy link

@felangel Having the exact same issue with using go_router and deep linking.
As soon as I open a screen that uses flow_builder, deep linking stops works because flow_builder overrides the system navigation.

@anqit
Copy link

anqit commented Apr 29, 2024

I'm not sure if this is the best issue to pile this on, but I would love to use this package (specifically wizard_router) for certain areas of an app while using go_router as the main navigation, but it has been difficult to get the two to play nicely with each other.

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

4 participants