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