Commit 6e70658
committed
fix(home): use router's real URL to gate the URL sync
`GoRouterState.of(context).matchedLocation` returns the route this
widget was built under, not the currently active location. Inside
a ShellRoute, that means it still reports `/` after the user has
navigated to `/routes`, so the earlier guard didn't actually skip
the URL replace and the user kept getting yanked back to the home
screen when a plan resolved.
Read the live URL from `router.routeInformationProvider.value.uri`
instead, which always reflects the browser's current path.1 parent 8e7c4b3 commit 6e70658
1 file changed
Lines changed: 8 additions & 2 deletions
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
292 | 298 | | |
293 | 299 | | |
294 | 300 | | |
| |||
0 commit comments