Flutter GetX Routing Will Redirected To InitialRoute

I currently investigate the following problem: When I try to open the page the first time with link arguments like "" I will immediately directed to the initial route "/". When I do it in the same tab again it will work and redirect me to the given page "/invite/dd/dd".

Here the console log for the first try:

The following message was thrown:
Could not navigate to initial route.
The requested route name was: "/invite/dd/dd"
There was no corresponding route in the app, and therefore the initial route specified will be ignored and "/" will be used instead.

The console log the second try in the same tab:

[GETX] GOING TO ROUTE /dashboard
[GETX] GOING TO ROUTE /invite/dd/dd
[GETX] GOING TO ROUTE /invite/dd/dd

It all worked fine at the second try when the page is loaded one time before!

The Sourcecode from the GetMaterialAPP in main.dart:

return GetMaterialApp(
            // initialBinding: AuthBinding(),
              initialRoute: RootRoute,
              opaqueRoute: true,
              unknownRoute: GetPage(name: "/not-found", page: () => PageNotFound(), transition: Transition.noTransition),
              defaultTransition: Transition.native,
              // transitionDuration:,
              getPages: [
                GetPage(name: RootRoute, page: () => Root()),
                GetPage(name: AuthenticationPageRoute, page: () => AuthenticationPage()),
                GetPage(name: RegistrationPageRoute, page: () => RegistrationPage()),
                GetPage(name: ForgotPasswordPageRoute, page: () => ForgotPasswordPage()),
                GetPage(name: InvitePageRoute + "/:inviteId/:userId", page: () => InvitePage()),
                // GetPage(name: TrackPageRoute + "/:orderId", page: () => TrackPage())
              debugShowCheckedModeBanner: false,
              title: '',
              theme: ThemeData(
                hoverColor: Colors.transparent,
                  splashColor: Colors.transparent,
                  // highlightColor: Colors.transparent,
                  scaffoldBackgroundColor: light,
                  // scaffoldBackgroundColor: Colors.white,
                  textTheme: GoogleFonts.mulishTextTheme(
                  pageTransitionsTheme: PageTransitionsTheme(builders: {
                    TargetPlatform.iOS: FadeUpwardsPageTransitionsBuilder(),

Thanks in advance. Feel free to ask anything.



Your code is absolutely OK and working without any issues. I tried but couldn't reproduce it.

However, you need to visit instead of Visiting will redirect to the initial route.

To remove the # from the URL, please refer to this