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/feedback/feedback_page.dart'; import '../../modules/feedback/progress/feedback_progress.dart'; import '../../modules/feedback/history/feedback_history.dart'; import '../../modules/feedback/send/feedback_send.dart'; import '../../modules/home/home_page.dart'; import '../../modules/main/main_page.dart'; import '../../modules/me/me_page.dart'; import '../../modules/notification/notification_page.dart'; import '../../modules/visitor/visitor_page.dart'; import '../../modules/visitor/now/visitor_now.dart'; import '../../modules/visitor/active/visitor_active.dart'; import '../../modules/visitor/history/visitor_history.dart'; import '../../modules/home/property_news/home_property_news_page.dart'; import '../../modules/home/latest_news/info/latest_news_info_screen.dart'; import '../../modules/home/latest_news/internal/latest_news_internal_screen.dart'; import '../../modules/home/latest_news/property/latest_news_property_screen.dart'; import '../../modules/home/latest_news/publish/latest_news_publish_screen.dart'; import '../../modules/home/latest_news/latest_news_page.dart'; import '../../modules/home/management_guides/management_guides_page.dart'; import '../../modules/visitor/register/visitor_register_page.dart'; import '../../modules/feedback/create/feedback_create_page.dart'; import '../../modules/feedback/detail/feedback_detail_page.dart'; import '../../modules/feedback/create_success/feedback_create_success_page.dart'; part 'main_page_router.gr.dart'; /*\ * Main模块的路由 */ @AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute') class MainPageRouter extends _$MainPageRouter { @override List get routes => [ CustomRoute( page: MainPageRoute.page, transitionsBuilder: applySlideTransition, path: RouterPath.main, children: [ AutoRoute(page: HomePageRoute.page, path: 'home'), AutoRoute( page: VisitorPageRoute.page, path: 'visitor', children: [ AutoRoute(page: VisitorNowPageRoute.page, path: 'now'), AutoRoute(page: VisitorActivePageRoute.page, path: 'active'), AutoRoute(page: VisitorHistoryPageRoute.page, path: 'history'), ], ), AutoRoute( page: FeedbackPageRoute.page, path: 'feedback', children: [ AutoRoute(page: FeedbackSendPageRoute.page, path: 'sent'), AutoRoute(page: FeedbackProgressPageRoute.page, path: 'progress'), AutoRoute(page: FeedbackHistoryPageRoute.page, path: 'history'), ], ), AutoRoute(page: MePageRoute.page, path: 'me'), ], ), CustomRoute(page: NotificationPageRoute.page, path: RouterPath.notification, transitionsBuilder: applySlideTransition), CustomRoute(page: HomePropertyNewsPageRoute.page, path: RouterPath.homePropertyNews, transitionsBuilder: applySlideTransition), CustomRoute( page: LatestNewsPageRoute.page, path: RouterPath.homeLatestNews, transitionsBuilder: applySlideTransition, children: [ AutoRoute(page: LatestNewsPropertyPageRoute.page, path: 'property'), AutoRoute(page: LatestNewsInternalPageRoute.page, path: 'internal'), AutoRoute(page: LatestNewsInfoPageRoute.page, path: 'info'), AutoRoute(page: LatestNewsPublishPageRoute.page, path: 'publish'), ], ), CustomRoute(page: ManagementGuidesPageRoute.page, path: RouterPath.homeManagementGuides, transitionsBuilder: applySlideTransition), CustomRoute(page: VisitorRegisterPageRoute.page, path: RouterPath.visitorRegister, transitionsBuilder: applySlideTransition), CustomRoute(page: FeedbackCreatePageRoute.page, path: RouterPath.feedbackCreate, transitionsBuilder: applySlideTransition), CustomRoute(page: FeedbackCreateSuccessPageRoute.page, path: RouterPath.feedbackCreateSuccess, transitionsBuilder: applySlideTransition), CustomRoute(page: FeedbackDetailPageRoute.page, path: RouterPath.feedbackDetail, transitionsBuilder: applySlideTransition), ]; }