facility_page_router.dart 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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/facility/facility_page.dart';
  6. import '../../modules/facility/active/facility_active_screen.dart';
  7. import '../../modules/facility/book/facility_book_screen.dart';
  8. import '../../modules/facility/deposit/facility_deposit_screen.dart';
  9. import '../../modules/facility/history/facility_history_screen.dart';
  10. import '../../modules/detail/facility_detail_page.dart';
  11. import '../../modules/booking/facility_booking_page.dart';
  12. import '../../modules/book_confirm/book_confirm_page.dart';
  13. part 'facility_page_router.gr.dart';
  14. /*\
  15. * Facility模块的路由
  16. */
  17. @AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute')
  18. class FacilityPageRouter extends _$FacilityPageRouter {
  19. @override
  20. List<AutoRoute> get routes => [
  21. CustomRoute(
  22. page: FacilityPageRoute.page,
  23. path: RouterPath.facility,
  24. transitionsBuilder: applySlideTransition,
  25. children: [
  26. AutoRoute(page: FacilityBookPageRoute.page, path: 'book'),
  27. AutoRoute(page: FacilityActivePageRoute.page, path: 'active'),
  28. AutoRoute(page: FacilityDepositPageRoute.page, path: 'deposit'),
  29. AutoRoute(page: FacilityHistoryPageRoute.page, path: 'history'),
  30. ],
  31. ),
  32. CustomRoute(page: FacilityDetailPageRoute.page, path: RouterPath.facilityDetail, transitionsBuilder: applySlideTransition),
  33. CustomRoute(page: FacilityBookingPageRoute.page, path: RouterPath.facilityBook, transitionsBuilder: applySlideTransition),
  34. CustomRoute(page: BookConfirmPageRoute.page, path: RouterPath.facilityBookConfirm, transitionsBuilder: applySlideTransition),
  35. ];
  36. }