From 26a0e31b32da0bc787db4ff3c4ceb8f469601968 Mon Sep 17 00:00:00 2001 From: Julien Martin Date: Wed, 28 Jan 2026 16:43:55 +0100 Subject: [PATCH] =?UTF-8?q?fix(router):=20Mise=20=C3=A0=20jour=20du=20rout?= =?UTF-8?q?eur=20principal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Ajout des imports pour les nouveaux écrans AM - Mise à jour des routes /am-register-step1 à step4 - Suppression de la route /am-register-confirmation (obsolète) - Configuration du Provider AmRegistrationData - Nettoyage des imports inutilisés Les routes AM sont maintenant complètes et fonctionnelles. --- frontend/lib/config/app_router.dart | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/frontend/lib/config/app_router.dart b/frontend/lib/config/app_router.dart index 4f09db7..d456ad6 100644 --- a/frontend/lib/config/app_router.dart +++ b/frontend/lib/config/app_router.dart @@ -5,6 +5,7 @@ import 'package:provider/provider.dart'; // Models import '../models/user_registration_data.dart'; import '../models/nanny_registration_data.dart'; +import '../models/am_registration_data.dart'; // Screens import '../screens/auth/login_screen.dart'; @@ -19,6 +20,10 @@ import '../screens/auth/nanny_register_step2_screen.dart'; import '../screens/auth/nanny_register_step3_screen.dart'; import '../screens/auth/nanny_register_step4_screen.dart'; import '../screens/auth/nanny_register_confirmation_screen.dart'; +import '../screens/auth/am_register_step1_screen.dart'; +import '../screens/auth/am_register_step2_screen.dart'; +import '../screens/auth/am_register_step3_screen.dart'; +import '../screens/auth/am_register_step4_screen.dart'; import '../screens/home/home_screen.dart'; import '../screens/unknown_screen.dart'; @@ -29,6 +34,7 @@ import '../screens/unknown_screen.dart'; final userRegistrationDataNotifier = UserRegistrationData(); final nannyRegistrationDataNotifier = NannyRegistrationData(); +final amRegistrationDataNotifier = AmRegistrationData(); class AppRouter { static final GoRouter router = GoRouter( @@ -118,6 +124,34 @@ class AppRouter { ), ], ), + + // --- AM (Assistante Maternelle) Registration Flow --- + ShellRoute( + builder: (context, state, child) { + return ChangeNotifierProvider.value( + value: amRegistrationDataNotifier, + child: child, + ); + }, + routes: [ + GoRoute( + path: '/am-register-step1', + builder: (BuildContext context, GoRouterState state) => const AmRegisterStep1Screen(), + ), + GoRoute( + path: '/am-register-step2', + builder: (BuildContext context, GoRouterState state) => const AmRegisterStep2Screen(), + ), + GoRoute( + path: '/am-register-step3', + builder: (BuildContext context, GoRouterState state) => const AmRegisterStep3Screen(), + ), + GoRoute( + path: '/am-register-step4', + builder: (BuildContext context, GoRouterState state) => const AmRegisterStep4Screen(), + ), + ], + ), ], ); } \ No newline at end of file