payment_page_router.dart 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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/payment/payment_page.dart';
  6. import '../../modules/payment/info/info_screen.dart';
  7. import '../../modules/payment/manage/manage_screen.dart';
  8. import '../../modules/payment/condo/active/condo_active_screen.dart';
  9. import '../../modules/payment/condo/history/condo_history_screen.dart';
  10. import '../../modules/payment/condo/payment/condo_payment_screen.dart';
  11. import '../../modules/payment_info/payment_info_page.dart';
  12. import '../../modules/payment_confirm/payment_confirm_page.dart';
  13. import '../../modules/payment_success/payment_success_page.dart';
  14. import '../../modules/add_card/add_card_page.dart';
  15. import '../../modules/choose_card/choose_card_page.dart';
  16. part 'payment_page_router.gr.dart';
  17. /*\
  18. * Payment 模块的路由
  19. */
  20. @AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute')
  21. class PaymentPageRouter extends _$PaymentPageRouter {
  22. @override
  23. List<AutoRoute> get routes => [
  24. CustomRoute(
  25. page: PaymentPageRoute.page,
  26. path: RouterPath.payment,
  27. transitionsBuilder: applySlideTransition,
  28. children: [
  29. AutoRoute(page: InfoPageRoute.page, path: 'info'),
  30. AutoRoute(page: CondoPaymentPageRoute.page, path: 'payment'),
  31. AutoRoute(page: CondoActivePageRoute.page, path: 'active'),
  32. AutoRoute(page: CondoHistoryPageRoute.page, path: 'history'),
  33. AutoRoute(page: ManagePageRoute.page, path: 'manage'),
  34. ],
  35. ),
  36. CustomRoute(page: PaymentInfoPageRoute.page, path: RouterPath.paymentInfo, transitionsBuilder: applySlideTransition),
  37. CustomRoute(page: PaymentConfirmPageRoute.page, path: RouterPath.paymentConfirm, transitionsBuilder: applySlideTransition),
  38. CustomRoute(page: PaymentSuccessPageRoute.page, path: RouterPath.paymentSuccess, transitionsBuilder: applySlideTransition),
  39. CustomRoute(page: AddCardPageRoute.page, path: RouterPath.paymentAddCard, transitionsBuilder: applySlideTransition),
  40. CustomRoute(page: ChooseCardPageRoute.page, path: RouterPath.paymentChooseCard, transitionsBuilder: applySlideTransition),
  41. ];
  42. }