-
-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect meta value returned when navigating with navigateNamed for Nested Routes #1882
Comments
Hey @carlosfiori I just tried your example and everything seems to be working fine? Mar-13-2024.6-24-07.PM.mp4note: I've removed the delayed code in the above example |
Hi @Milad-Akarie, thank you for your response. The problem arises when navigating from the home page to the profile page for the first time. I tested it in version 9.4 with Flutter 3.19.3, and the issue persists. Gravacao.de.Tela.2024-03-14.as.10.33.44.mov |
@carlosfiori Believe it or not this issue took more than 20 hours of work, it's obviously a bigger issue than your use-case, I'm sure the fix will effect alot of open issues. anyways, confirm it works for you? v7.9.1 |
Hi @Milad-Akarie just test in 7.9.1 and work just great, thank you very much |
@carlosfiori 7.9.2 has a hot fix related to this issue |
Great, I tested it on 7.9.2 and everything still works, thanks |
When navigating using
navigateNamed
for nested routes in AutoRoute, themeta
value is being returned incorrectly. Instead of retrieving themeta
value from the destination route, it is returning themeta
value of the parent route.Use Case
We use information from the
meta
to decide whether or not to show the BottomNavigationBar depending on the screen, but due to the incorrectmeta
being provided, the BottomNavigationBar is being displayed erroneously.Reproduce
You can reproduce this issue by cloning this repository. When clicking the "go to profile" button on the home page, it should navigate to the profile screen without displaying the BottomNavigationBar.
It has been noticed that by adding a delay of 100 milliseconds, the
meta
value is returned correctly:Expected Behavior:
The returned
meta
value should correspond to the destination route, providing relevant information associated with that specific route.Current Behavior:
The returned
meta
value corresponds to the parent route when retrieved immediately after navigation, which is incorrect. However, introducing a 100-millisecond delay before retrieving themeta
value results in the correctmeta
value being returned.Additional Information:
This issue affects the functionality of applications that rely on accurate
meta
information for nested routes. This can lead to incorrect rendering or behavior based on incorrectmeta
data.The text was updated successfully, but these errors were encountered: