You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have an app with many different BeamLocations in it. Most of these locations and paths can only be accessed from one place in the app which makes things simple. However, there are a few routes that can be reached from many different places. For example, the login screen anytime you tap something that requires authentication, as well as a web view route that serves many different purposes.
My question is, what location should I add the login and web view routes too?
Solution 1 - If I make them have their own location, then once I beam to them, I lose the page states of the previous location I was at. So when I beam back, the route is correct, but the page state is gone.
Solution 2 - If I add the pages to every location, then I have to duplicate a lot of work since I have to consider every possible way that these routes can be reached. For example, I would have to add:
//Location 0@overrideList<Pattern> get pathPatterns {
return [
'/path',
'/path/to',
'/path/to/login', //<-- Can reach the login screen from the /path/to route'/path/to/page',
'/path/to/page/web-view', //<-- Can reach the web view screen from the /path/to/page route
];
}
//Location 1@overrideList<Pattern> get pathPatterns {
return [
'/another',
'/another/path',
'/another/path/login', //<-- Can reach the login screen from the /another/path route'/another/path/to',
'/another/path/to/web-view', //<-- Can reach the web view screen from the /another/path/to route
];
}
...
//Location 2
Describe the solution you'd like
When calling beamTo or beamToNamed, add a parameter to join page stacks like so:
If this is set, the page stack of the new location will be stacked on top of the page stack of the current location, instead of disposing the current page stack in favor of the new one.
The text was updated successfully, but these errors were encountered:
Colman
changed the title
Add page stack to the previous location's page stack
[Feature Request] Add page stack to the previous location's page stack
Jan 11, 2025
Is your feature request related to a problem? Please describe.
I have an app with many different
BeamLocations
in it. Most of these locations and paths can only be accessed from one place in the app which makes things simple. However, there are a few routes that can be reached from many different places. For example, the login screen anytime you tap something that requires authentication, as well as a web view route that serves many different purposes.My question is, what location should I add the login and web view routes too?
Solution 1 - If I make them have their own location, then once I beam to them, I lose the page states of the previous location I was at. So when I beam back, the route is correct, but the page state is gone.
Solution 2 - If I add the pages to every location, then I have to duplicate a lot of work since I have to consider every possible way that these routes can be reached. For example, I would have to add:
Describe the solution you'd like
When calling
beamTo
orbeamToNamed
, add a parameter to join page stacks like so:If this is set, the page stack of the new location will be stacked on top of the page stack of the current location, instead of disposing the current page stack in favor of the new one.
The text was updated successfully, but these errors were encountered: