-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi,
I like your example, but I found one issue.
It can be observed if you scroll down in one of the lists, and then click on an item. The details page then opens, but scroll position in the list is lost.
One possible solution I had in mind was to reuse the same page, something like this:
StatefulShellBranch(
initialLocation: '/nav1/null',
navigatorKey: _nav1NavigatorKey,
routes: [
GoRoute(
name: AppRouter.nav1Details,
path: '/nav1/:id',
pageBuilder: (context, state) => NoTransitionPage(
child: AppScaffold(
body: NavListScreen(
key: state.pageKey,
listId: 1,
),
secondaryBody: state.pathParameters["id"] == 'null'
? null
: DetailsScreen(
id: state.pathParameters["id"],
),
),
),
),That does retain the state of the list correctly, but it also means that there is no way to navigate back from the details page.
I also tried to figure something out with keys, but couldn't get that to work either.
Metadata
Metadata
Assignees
Labels
No labels