Skip to content
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

queryParameters are not available in child page of the IndexedPage. #332

Open
darkstarx opened this issue Dec 21, 2023 · 0 comments
Open

Comments

@darkstarx
Copy link

darkstarx commented Dec 21, 2023

Hello! Thanks for the great package.

I faced with some troubles. The url is /home?showMenu=true, but showMenu from queryParameters is not available in the RootPage, they are visible only in nested pages (HomePage and ProfilePage).

    routes: {
      '/': (route) {
        print('!!!=== / ${route.queryParameters}');
        return IndexedPage(
          paths: const [ '/home', '/profile' ],
          child: RootPage(showMenu: route.queryParameters.containsKey('showMenu')),
        );
      },
      '/home': (route) {
        print('!!!=== /home ${route.queryParameters}');
        return const MaterialPage(child: HomePage());
      },
      '/profile': (route) => const MaterialPage(child: ProfilePage()),
    },

How can I get queryParameters in the RootPage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant