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

generate Invalid route on sub-module #242

Open
DevThurain opened this issue Jan 20, 2024 · 0 comments
Open

generate Invalid route on sub-module #242

DevThurain opened this issue Jan 20, 2024 · 0 comments

Comments

@DevThurain
Copy link

After running sub-module commend, generated route is unusable.
E.g get create page:login on auth
Generated route for test page is '_Paths.AUTH + _Paths.LOGIN'

app_routes.dart

abstract class Routes {
  Routes._();
  static const SPLASH = _Paths.SPLASH;
  static const LOGIN = _Paths.AUTH + _Paths.LOGIN;
}

abstract class _Paths {
  _Paths._();
  static const AUTH = '/auth';
  static const LOGIN = '/login';
  static const SPLASH = '/splash';
} 

app_pages.dart

GetPage(
   name: _Paths.LOGIN,
   page: () => const LoginView(),
   binding: LoginBinding(),
),

It is impossible to use Get.toNamed(Routes.LOGIN).
because generated route for login is = "/auth/login" and actual route is = "/login"
package version is 7.0.8

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