This PR shows potential way to introduce deep link support with usage of MaterialApp.router(). The main problem is that FlowBuilder does not expose a way to notify about popping the page. Thus, I used NavigatorObserver to check if the popped route is related to the deep link that was added to the state of NavigationCubit. If FlowBuilder would allow to pass callback to modify the state when the deep linked page is pushed, then it would be even simpler, e.g.:
Status
IN DEVELOPMENT
Breaking Changes
Description
This PR shows potential way to introduce deep link support with usage of
MaterialApp.router()
. The main problem is that FlowBuilder does not expose a way to notify about popping the page. Thus, I used NavigatorObserver to check if the popped route is related to the deep link that was added to the state of NavigationCubit. If FlowBuilder would allow to pass callback to modify the state when the deep linked page is pushed, then it would be even simpler, e.g.:How to test:
https://user-images.githubusercontent.com/16854239/137512664-67d375f7-3962-48a2-8dee-ea59daa491d2.mp4
Type of Change