page_router.dart 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. import '../modules/select_country/select_country_page.dart';
  10. class AuthPageRouter {
  11. static final routes = [
  12. //首页
  13. GetPage(
  14. name: RouterPath.main,
  15. page: () => MainPage(),
  16. ),
  17. //登录
  18. GetPage(
  19. name: RouterPath.authLogin,
  20. page: () => LoginPage(),
  21. ),
  22. //注册
  23. GetPage(
  24. name: RouterPath.authSignUp,
  25. page: () => SignUpPage(),
  26. ),
  27. //重置密码
  28. GetPage(
  29. name: RouterPath.authResetPassword,
  30. page: () => ResetPasswordPage(),
  31. ),
  32. //设置
  33. GetPage(
  34. name: RouterPath.settings,
  35. page: () => SettingPage(),
  36. ),
  37. //切换国家
  38. GetPage(
  39. name: RouterPath.authSelectCountry,
  40. page: () => SelectCountryPage(),
  41. ),
  42. ];
  43. }