Open matanshukry opened 1 year ago
I'm facing a similar issue too. It looks like this happens when you nest beamers. When try to navigate to a route which is handled by a BeamLocation
in the parent beamer from the inner beamer, the inner beamer's BeamLocation
s also try to resolve the route, which ends up failing.
example:
RootLocation
consists of two paths, /books and /articlesBooksLocation
consists of a path, /books/:idThere are two nested beamers, where the outer beamer uses RootLocation
and the inner beamer uses BooksLocation
. When you are in, say, /books/123 and try to navigate to /articles, both BooksLocation
and RootLocation
try to resolve /articles. It succeeds in RootLocation
but fails in BooksLocation
.
In my case, this happens all the time when i try to navigate from an inner beamer, not just once. For now, I managed to side step the issue by returning a BeamPage
whose child is a SizedBox.shrink
in the inner BeamLocation. There are no errors (or the not found page) and the widget tree as seen via the dev tools seems to be fine too.
Describe the bug
tl&dr: I'm seeing a "not found" tab for a quick second, for the 1st time, instead of the expected route.
In the reproducible app that follow, ther are 2 flows:
On the 1st everything seems fine. On the 2nd, we can see there's a "not found" page in between, probably for the nested. It only happens in this flow, and only for the 1st time.
Flow #1 / Articles start - which works well:
https://github.com/slovnicki/beamer/assets/5613042/86f75d4e-f0f8-4b07-b4cc-960958f8381d
Flow #2 / books start - where we can see the issue:
https://github.com/slovnicki/beamer/assets/5613042/5a809872-fce6-4fdd-b0c4-ec14b143de31
Beamer version: (e.g.
v0.14.1
,master
, ...) v1.5.5To Reproduce Steps to reproduce the behavior:
my_app.dart
, and changeinitialPath
to/books
(Flow #2).To clarify, if you do the same flow without restarting the app - there is no "not found" page. It seems to only happen for the 1st time.
Expected behavior The routes should be shown without a "not found" in betweem them.
Screenshots Added videos before, should be enough.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.