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

When opening URL directly takes users to / #314

Open
rafid-nsv opened this issue Nov 29, 2022 · 0 comments
Open

When opening URL directly takes users to / #314

rafid-nsv opened this issue Nov 29, 2022 · 0 comments

Comments

@rafid-nsv
Copy link

Inside app URLs working fine but when I try open a link directly browser like test.web.app/home/ad/45Ui2I0I8283CgLGlYBh user is being redirected to route '/'.

I'm not sure it's a bug but I need this feature in order to share links.

Routes

routes: {
'/': () => const MaterialPage(child: Splash()),
'/$loginRoute' : (
) => const MaterialPage(child: Login()),
'/$welcomeRoute': () => const MaterialPage(child: OnBoarding()),
'/$homeRoute': (
) => const MaterialPage(child: Dashboard()),
'/$homeRoute/$jobRoute': () => const MaterialPage(child: EmptyScreen(title: jobRoute,)),
'/$homeRoute/$adsRoute': (
) => const MaterialPage(child: EmptyScreen(title: adsRoute,)),
'/$homeRoute/$languageRoute': () => const MaterialPage(child: LanguageScreen()),
'/$homeRoute/$profileRoute': (
) => const MaterialPage(child: MyProfile()),
'/$homeRoute/$profileRoute/$editRoute': () => MaterialPage(child: EditProfile()),
'/$homeRoute/$profileRoute/$adSettingsRoute': (
) => const MaterialPage(child: AdSettings()),
'/$homeRoute/$profileRoute/$bankInfoRoute': () => const MaterialPage(child: EmptyScreen(title: bankInfoRoute,)),
'/$homeRoute/$profileRoute/$paymentRoute': (
) => const MaterialPage(child: EmptyScreen(title: paymentRoute,)),
'/$homeRoute/$profileRoute/$languageRoute': (_) => const MaterialPage(child: LanguageScreen()),
'/$homeRoute/$newAdRoute': (info) => MaterialPage(child: CreateAd(hero: info.queryParameters["signature"] ?? UniqueKey().toString())),
'/$homeRoute/user/:id': (info) => MaterialPage(
child: UserView(name: info.pathParameters['id'] ?? "",)
),
'/$homeRoute/$adRoute/:id':(info) => MaterialPage(child: AdDetail(adId: info.pathParameters['id'] ?? "",))
}

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