facility_page_router.dart 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. part 'facility_page_router.gr.dart';
  13. /*\
  14. * Facility模块的路由
  15. */
  16. @AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute')
  17. class FacilityPageRouter extends _$FacilityPageRouter {
  18. @override
  19. List<AutoRoute> get routes => [
  20. CustomRoute(
  21. page: FacilityPageRoute.page,
  22. path: RouterPath.facility,
  23. transitionsBuilder: applySlideTransition,
  24. children: [
  25. AutoRoute(page: FacilityBookPageRoute.page, path: 'book'),
  26. AutoRoute(page: FacilityActivePageRoute.page, path: 'active'),
  27. AutoRoute(page: FacilityDepositPageRoute.page, path: 'deposit'),
  28. AutoRoute(page: FacilityHistoryPageRoute.page, path: 'history'),
  29. ],
  30. ),
  31. CustomRoute(page: FacilityDetailPageRoute.page, path: RouterPath.facilityDetail, transitionsBuilder: applySlideTransition),
  32. CustomRoute(page: FacilityBookingPageRoute.page, path: RouterPath.facilityBook, transitionsBuilder: applySlideTransition),
  33. ];
  34. }