123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- 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<AutoRoute> 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,
- ),
- ];
- }
|