flow_builder icon indicating copy to clipboard operation
flow_builder copied to clipboard

FlowBuilder breaks Navigator 2.0 system level routing (deep links specifically)

Open pstromberg98 opened this issue 2 years ago • 20 comments

Describe the bug Not sure if this is a "defect" of flow_builder, but it might be worth mentioning in the docs.

Using FlowBuilder alongside AutoRoute (and probably any Navigator 2.0 based solution) will break deep linking. This is because flow_builder sets its own handler for the SystemNavigation.instance method channel thus hijacking all system level routing calls (didPopRoute, didPushRoute, etc).

To Reproduce Steps to reproduce the behavior:

  1. Set up project with AutoRoute
  2. Set up deep linking (https://docs.flutter.dev/ui/navigation/deep-linking)
  3. Set initial route to contain a FlowBuilder widget
  4. Try to deep link to app in foreground (xcrun simctl openurl booted https://{your-domain}/)
  5. AutoRoute doesn't receive deep link (deepLinkBuilder callback isn't ran)

Expected behavior Not sure. If FlowBuilder isn't supposed to be used with Navigator 2.0 routing packages then I think it should be mentioned in the documentation or README. If we want it to be able to coexist with Navigator 2.0 routing packages then I would expect FlowBuilder to not interfere/break them.

Additional context I have only tested this with AutoRouter and have confirmed the issue (and that removing FlowBuilder fixes it).

Screenshot 2023-11-28 at 5 31 55 PM

pstromberg98 avatar Nov 29 '23 00:11 pstromberg98

Thanks for reporting this! This is definitely a bug imo and FlowBuilder should both support deep linking itself as well as work nicely with existing packages. Are you able to share a minimal reproduction sample? Thanks!

felangel avatar Nov 29 '23 13:11 felangel

@felangel Sure! I'll throw something together soon.

pstromberg98 avatar Nov 29 '23 20:11 pstromberg98

Hi @felangel here is a repro repop. Check the uri text at the top of the screen After opening the flow page - universal links are not woking anymore

https://github.com/artflutter/flow_builder_unilinks_bug

https://github.com/felangel/flow_builder/assets/6721286/92f1363b-f0de-4139-988c-717925962c77

vasilich6107 avatar Mar 01 '24 08:03 vasilich6107

Hi @felangel could you take a look

vasilich6107 avatar Mar 09 '24 21:03 vasilich6107

Good evening @felangel It would be nice to get a response Thanks

vasilich6107 avatar Mar 18 '24 21:03 vasilich6107

Good evening @felangel It would be nice to get a response Thanks

Hey sorry for the slow response I’ll try to take a look either today or tomorrow 👍

felangel avatar May 21 '24 14:05 felangel

Hi @felangel Did you have a chance to take a look?

vasilich6107 avatar Jun 09 '24 13:06 vasilich6107

Hi @felangel Did you have a chance to take a look?

Sorry this slipped through the cracks! Will try to find some time in the next few days to look 👍

felangel avatar Jun 11 '24 04:06 felangel

Hi @felangel just a friendly reminder :-)

vasilich6107 avatar Jun 28 '24 08:06 vasilich6107

A sImilar thing happened to me as well on the web: When I navigate to a screen that has FlowBuilder browser back (which should be the same as deep-linking) stops working

uberchilly avatar Jul 14 '24 19:07 uberchilly

Hi @felangel Any updates?

vasilich6107 avatar Jul 19 '24 23:07 vasilich6107