import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:router/ext/auto_router_extensions.dart'; import 'package:router/path/router_path.dart'; import '../../modules/community/community_page.dart'; import '../../modules/community/news/news_page.dart'; import '../../modules/community/following/following_page.dart'; import '../../modules/community/foryou/foryou_page.dart'; import '../../modules/community/newsfeed_detail/newsfeed_detail_page.dart'; import '../../modules/community/newsfeed_post/newsfeed_post_page.dart'; import '../../modules/community/newsfeed_myposts/newsfeed_myposts_page.dart'; import '../../modules/garage/garage_page.dart'; import '../../modules/garage/for_sale/for_sale_page.dart'; import '../../modules/garage/for_rent/for_rent_page.dart'; import '../../modules/garage/garagesale_detail/garagesale_detail_page.dart'; import '../../modules/garage/garagesale_post/garagesale_post_page.dart'; import '../../modules/garage/garagesale_myposts/garagesale_myposts_page.dart'; part 'community_page_router.gr.dart'; /*\ * Community组件的路由 */ @AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute') class CommunityPageRouter extends _$CommunityPageRouter { @override List get routes => [ CustomRoute( page: CommunityPageRoute.page, path: RouterPath.community, transitionsBuilder: applySlideTransition, children: [ // newsfeed-news page CustomRoute( page: NewsPageRoute.page, path: RouterPath.newsfeedNews, transitionsBuilder: applySlideTransition, ), // newsfeed-following page CustomRoute( page: FollowingPageRoute.page, path: RouterPath.newsfeedFollowing, transitionsBuilder: applySlideTransition, ), // newsfeed-foryou page CustomRoute( page: ForyouPageRoute.page, path: RouterPath.newsfeedForyou, transitionsBuilder: applySlideTransition, ), ], ), CustomRoute( page: NewsfeedPostPageRoute.page, path: RouterPath.newsFeedPost, transitionsBuilder: applySlideTransition, ), CustomRoute( page: NewsfeedDetailPageRoute.page, path: RouterPath.newsFeedDetail, transitionsBuilder: applySlideTransition, ), CustomRoute( page: NewsfeedMypostsPageRoute.page, path: RouterPath.newsFeedMyPosts, transitionsBuilder: applySlideTransition, ), // Garage CustomRoute( page: GaragePageRoute.page, path: RouterPath.garage, transitionsBuilder: applySlideTransition, children: [ // garageSale-forSale page CustomRoute( page: ForsalePageRoute.page, path: RouterPath.garageForSale, transitionsBuilder: applySlideTransition, ), // garageSale-forRent page CustomRoute( page: ForrentPageRoute.page, path: RouterPath.garageForRent, transitionsBuilder: applySlideTransition, ) ] ), CustomRoute( page: GaragesalePostPageRoute.page, path: RouterPath.garageSalePost, transitionsBuilder: applySlideTransition, ), CustomRoute( page: GaragesaleDetailPageRoute.page, path: RouterPath.garageSaleDetail, transitionsBuilder: applySlideTransition, ), CustomRoute( page: GaragesaleMypostsPageRoute.page, path: RouterPath.garageSaleMyPosts, transitionsBuilder: applySlideTransition, ), ]; }