diff --git a/packages/smooth_app/lib/pages/navigator/app_navigator.dart b/packages/smooth_app/lib/pages/navigator/app_navigator.dart index 270404ed6cb..9a8664d1cb9 100644 --- a/packages/smooth_app/lib/pages/navigator/app_navigator.dart +++ b/packages/smooth_app/lib/pages/navigator/app_navigator.dart @@ -18,6 +18,9 @@ import 'package:smooth_app/pages/product/edit_product_page.dart'; import 'package:smooth_app/pages/product/product_loader_page.dart'; import 'package:smooth_app/pages/product/product_page/new_product_page.dart'; import 'package:smooth_app/pages/scan/carousel/scan_carousel_manager.dart'; +import 'package:smooth_app/pages/scan/search_page.dart'; +import 'package:smooth_app/pages/scan/search_product_helper.dart'; +import 'package:smooth_app/pages/user_management/forgot_password_page.dart'; import 'package:smooth_app/pages/search/search_page.dart'; import 'package:smooth_app/pages/search/search_product_helper.dart'; import 'package:smooth_app/pages/user_management/sign_up_page.dart'; @@ -242,6 +245,16 @@ class _SmoothGoRouter { } }, ), + GoRoute( + path: _InternalAppRoutes.FORGOT_PASSWORD_PAGE, + builder: (_, __) => const ForgotPasswordPage(), + ), + GoRoute( + path: _InternalAppRoutes.EXTERNAL_PAGE, + builder: (BuildContext context, GoRouterState state) { + return ExternalPage(path: state.uri.queryParameters['path']!); + }, + ), GoRoute( path: _InternalAppRoutes.SIGNUP_PAGE, builder: (_, __) => const SignUpPage(), @@ -307,6 +320,8 @@ class _SmoothGoRouter { return AppRoutes.GUIDE_NUTRISCORE_V2; } else if (path == _ExternalRoutes.SIGNUP) { return AppRoutes.SIGNUP; + } else if (path == _ExternalRoutes.FORGOT_PASSWORD) { + return AppRoutes.FORGOT_PASSWORD; } else if (path != _InternalAppRoutes.HOME_PAGE) { externalLink = true; } @@ -418,6 +433,7 @@ class _InternalAppRoutes { static const String SEARCH_PAGE = '_search'; static const String EXTERNAL_PAGE = '_external'; static const String SIGNUP_PAGE = '_signup'; + static const String FORGOT_PASSWORD_PAGE = '_forgot_password'; static const String _GUIDES = '_guides'; static const String GUIDE_NUTRISCORE_V2_PAGE = '_nutriscore-v2'; @@ -428,6 +444,7 @@ class _ExternalRoutes { static const String PRODUCT_EDITION = '/cgi/product.pl'; static const String GUIDE_NUTRISCORE_V2 = '/nutriscore-v2'; static const String SIGNUP = '/signup'; + static const String FORGOT_PASSWORD = '/forgot-password'; } /// A list of internal routes to use with [AppNavigator] @@ -474,6 +491,8 @@ class AppRoutes { '/${_InternalAppRoutes._GUIDES}/${_InternalAppRoutes.GUIDE_NUTRISCORE_V2_PAGE}'; static String get SIGNUP => '/${_InternalAppRoutes.SIGNUP_PAGE}'; + static String get FORGOT_PASSWORD => + '/${_InternalAppRoutes.FORGOT_PASSWORD_PAGE}'; // Open an external link (where path is relative to the OFF website) static String EXTERNAL(String path) =>