community_page_router.dart 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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/community/community_page.dart';
  6. import '../../modules/newsfeed/newsfeed_page.dart';
  7. import '../../modules/garagesale/garagesale_page.dart';
  8. part 'community_page_router.gr.dart';
  9. /*\
  10. * Community组件的路由
  11. */
  12. @AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute')
  13. class CommunityPageRouter extends _$CommunityPageRouter {
  14. @override
  15. List<AutoRoute> get routes => [
  16. CustomRoute(
  17. page: CommunityPageRoute.page,
  18. path: RouterPath.community,
  19. transitionsBuilder: applySlideTransition,
  20. children: [
  21. CustomRoute(
  22. page: NewsfeedPageRoute.page,
  23. path: RouterPath.newsFeed,
  24. transitionsBuilder: applySlideTransition,
  25. ),
  26. CustomRoute(
  27. page: GaragesalePageRoute.page,
  28. path: RouterPath.garageSale,
  29. transitionsBuilder: applySlideTransition,
  30. ),
  31. ]
  32. ),
  33. ];
  34. }