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/page/feedback_page.dart'; import '../../modules/home/page/home_page.dart'; import '../../modules/main/page/main_page.dart'; import '../../modules/me/page/me_page.dart'; import '../../modules/notification/notification_page.dart'; import '../../modules/visitor/page/visitor_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'), AutoRoute(page: FeedbackPageRoute.page, path: 'feedback'), AutoRoute(page: MePageRoute.page, path: 'me'), ], ), CustomRoute(page: NotificationPageRoute.page, path: RouterPath.notification, transitionsBuilder: applySlideTransition), ]; }