felangel / felangel/flow_builder

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

Open
#117 20 comments 7 reactions 1 assignee Claimed by @felangel View on GitHub
bug
Dominant language
Dart
Stars
416
Forks
68
PR merge metrics
No merged PRs in 30d

Description

**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](https://github.com/felangel/flow_builder/assets/18646900/48ac5a55-1425-4923-ac9f-0db115e82228)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.