facility_page_router.dart 2.0 KB

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