property_page_router.dart 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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/property/page/property_page.dart';
  6. import '../../modules/ioan/property_ioan_page.dart';
  7. import '../../modules/news/page/property_news_page.dart';
  8. import '../../modules/news_detail/property_news_detail_page.dart';
  9. import '../../modules/sale/page/property_sale_page.dart';
  10. import '../../modules/rent/page/property_rent_page.dart';
  11. part 'property_page_router.gr.dart';
  12. /*\
  13. * Property 模块的路由
  14. */
  15. @AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute')
  16. class PropertyPageRouter extends _$PropertyPageRouter {
  17. @override
  18. List<AutoRoute> get routes => [
  19. CustomRoute(
  20. page: PropertyPageRoute.page,
  21. path: RouterPath.property,
  22. transitionsBuilder: applySlideTransition,
  23. children: [
  24. CustomRoute(
  25. page: PropertyIoanPageRoute.page,
  26. path: RouterPath.propertyIoan,
  27. transitionsBuilder: applySlideTransition,
  28. ),
  29. CustomRoute(
  30. page: PropertyNewsPageRoute.page,
  31. path: RouterPath.propertyNews,
  32. transitionsBuilder: applySlideTransition,
  33. ),
  34. CustomRoute(
  35. page: PropertySalePageRoute.page,
  36. path: RouterPath.propertySale,
  37. transitionsBuilder: applySlideTransition,
  38. ),
  39. CustomRoute(
  40. page: PropertyRentPageRoute.page,
  41. path: RouterPath.propertyRent,
  42. transitionsBuilder: applySlideTransition,
  43. ),
  44. ]
  45. ),
  46. // 新闻详情页面
  47. CustomRoute(
  48. page: PropertyNewsDetailPageRoute.page,
  49. path: RouterPath.propertyNewsDetail,
  50. transitionsBuilder: applySlideTransition,
  51. children: const []
  52. ),
  53. ];
  54. }