jonataslaw / get_cli

Official Getx CLI
Apache License 2.0
578 stars 165 forks source link

generate Invalid route on sub-module #242

Open DevThurain opened 6 months ago

DevThurain commented 6 months ago

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