page_router.dart 952 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import 'package:cpt_auth/modules/setting/setting_page.dart';
  2. import 'package:cpt_auth/modules/sign_up/sign_up_page.dart';
  3. import 'package:flutter/material.dart';
  4. import 'package:get/get.dart';
  5. import 'package:router/path/router_path.dart';
  6. import '../modules/login/login_page.dart';
  7. import '../modules/main/main_page.dart';
  8. import '../modules/reset_psd/reset_psd_page.dart';
  9. class AuthPageRouter {
  10. static final routes = [
  11. //首页
  12. GetPage(
  13. name: RouterPath.MAIN,
  14. page: () => MainPage(),
  15. ),
  16. //登录
  17. GetPage(
  18. name: RouterPath.AUTH_LOGIN,
  19. page: () => LoginPage(),
  20. ),
  21. //注册
  22. GetPage(
  23. name: RouterPath.AUTH_SIGNUP,
  24. page: () => SignUpPage(),
  25. ),
  26. //重置密码
  27. GetPage(
  28. name: RouterPath.AUTH_RESET_PSD,
  29. page: () => ResetPasswordPage(),
  30. ),
  31. //重置密码
  32. GetPage(
  33. name: RouterPath.SETTINGS,
  34. page: () => SettingPage(),
  35. ),
  36. ];
  37. }