Closed doughywilson closed 2 years ago
Is your page stateful or stateless? It should work if it's stateful.
The page is stateful and all other state is kept, it's just that the scrolling doesn't stay put. This could be solvable by implementing your strategy for redirects though. I'm thinking it could be the way I am checking auth state in my app is getting in the way of the new routing paradigm.
Can you post a minimal repro sample?
Before I send you or anyone else down that rabbit hole, I want to try implementing the redirect function for checking auth in my app. I think this could be causing my widgets to rebuild in the flow of the new routing. I have run into another issue with the redirect function, so I need to solve that before I'll know if this issue is relevant to my application or go_router.
This PR https://github.com/csells/go_router/pull/56 updates the example nested_nav.dart
to demonstrate it with the FamilyView
tab content screen(s) and also shows that it works in the example case.
I have a tab screen using
AutomaticKeepAliveClientMixin
that has a listview of many items. When a user clicks one of those items, I do a pushNamed() to get to the detail view of that item, and the appbar provides the back button to pop the navigation stack. When the navigation stack gets popped back to the original listview tab, the scroll position goes back to the top.I do no this issue when using the traditional router. Only with go_router.
This issue might be related to #44 .
Thanks!