auth_page_router.dart 1.1 KB

12345678910111213141516171819202122232425262728
  1. import 'package:auto_route/auto_route.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:router/ext/auto_router_extensions.dart';
  4. import 'package:router/path/router_path.dart';
  5. import '../../modules/auth_login/auth_login_page.dart';
  6. import '../../modules/forgot_input/forgot_input_page.dart';
  7. import '../../modules/forgot_verify/forgot_verify_page.dart';
  8. import '../../modules/sign_up/sign_up_page.dart';
  9. part 'auth_page_router.gr.dart';
  10. /*\
  11. * 全局的通用页面的路由
  12. */
  13. @AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute')
  14. class AuthPageRouter extends _$AuthPageRouter {
  15. @override
  16. List<AutoRoute> get routes => [
  17. CustomRoute(page: AuthLoginPageRoute.page, path: RouterPath.authLogin, transitionsBuilder: applySlideTransition),
  18. CustomRoute(page: ForgotInputPageRoute.page, path: RouterPath.authForgotInput, transitionsBuilder: applySlideTransition),
  19. CustomRoute(page: ForgotVerifyPageRoute.page, path: RouterPath.authForgotVerify, transitionsBuilder: applySlideTransition),
  20. CustomRoute(page: SignUpPageRoute.page, path: RouterPath.authSignUp, transitionsBuilder: applySlideTransition),
  21. ];
  22. }