basic_page_router.dart 775 B

12345678910111213141516171819202122
  1. import 'package:auto_route/auto_route.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:router/ext/auto_router_extensions.dart';
  4. import 'package:router/path/router_path.dart';
  5. import '../modules/global_web_page.dart';
  6. import '../modules/preview_photo_page.dart';
  7. part 'basic_page_router.gr.dart';
  8. /*\
  9. * 全局的通用页面的路由
  10. */
  11. @AutoRouterConfig(replaceInRouteName: 'Page|Screen,PageRoute')
  12. class BasicPageRouter extends _$BasicPageRouter {
  13. @override
  14. List<AutoRoute> get routes => [
  15. CustomRoute(page: GlobalWebPageRoute.page, path: RouterPath.globalWeb, transitionsBuilder: applySlideTransition),
  16. CustomRoute(page: PreviewPhotoPageRoute.page, path: RouterPath.previewImage, transitionsBuilder: applySlideTransition),
  17. ];
  18. }