beamer icon indicating copy to clipboard operation
beamer copied to clipboard

Deeplinking to nested beams

Open ericf-br opened this issue 1 year ago • 6 comments

I can't seem to find a way to do this.

The main app has a BeamerDelegate with Locations A, B, C. Location A is a BottomNavBar with it's own Beamer and Delegate, D, E ,F

A deep link such as myapp://myapp.com/B will work.
A deep link to myapp://myapp.com/E will NOT work because it's delegate is not the main app's delegate, so you get page not found. I can't find a way to "forward" the deep link to the bottom nav bar's BeamerDelegate.

Thoughts?

ericf-br avatar Jul 31 '22 03:07 ericf-br

@ericf-br at least there is one work around you can use: navigate to concrete tab you want with something like bloc/cubit/valuenotifier. And then navigate to concrete screen via tab beamer delegate.

IlyaMax avatar Jul 31 '22 08:07 IlyaMax

I handle incoming links and write them into a state object. Then the listener decides where to navigate, and therefore you could use a nested path for directly navigating to location E, e.g. with a path '/A/E'.

rivella50 avatar Jul 31 '22 12:07 rivella50

@ericf-br I've found the same issue when creating this example.

Have you other weird behaviors on your main app structure with nested navigation and BottomNavBar ?

(Don't hesitate to take a look at the example's PR to see if you have already fix some of the issues listed)

NeroThroN avatar Aug 01 '22 14:08 NeroThroN

myapp://myapp.com/E will NOT work

This is because E is inside the A router, so A router has to be built/entered first. A route like myapp://myapp.com/A/E and having A handle all /A/* paths should do the job.

slovnicki avatar Sep 06 '22 21:09 slovnicki

Well the nested beamer is still a separated navigator from root beamer as I understand,I can feeling there is design conflicting between "flutter app state styles url routing" and "web url navigation",and make its hard to deal with real web url stuff.🤔

LaysDragon avatar Aug 09 '23 16:08 LaysDragon

@ericf-br were you able to figure out how to properly implement this? 😄

Ashhas avatar Aug 30 '23 15:08 Ashhas