From 5d7eb9eb36ce5c1825074260a5f4e2f3e42ef97b Mon Sep 17 00:00:00 2001 From: Julien Martin Date: Tue, 3 Feb 2026 16:17:49 +0100 Subject: [PATCH] =?UTF-8?q?fix(#79):=20Supprimer=20toutes=20les=20r=C3=A9f?= =?UTF-8?q?=C3=A9rences=20obsol=C3=A8tes=20=C3=A0=20Nanny?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrections suite au merge master: - Suppression imports nanny_register_step*.dart (fichiers supprimés) - Suppression variable nannyRegistrationDataNotifier - Suppression section Nanny Registration Flow complète - Ajout import go_router dans login_screen.dart L'application compile maintenant sans erreurs. Référence: #79 Co-authored-by: Cursor --- frontend/lib/config/app_router.dart | 45 --------------------- frontend/lib/screens/auth/login_screen.dart | 1 + 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/frontend/lib/config/app_router.dart b/frontend/lib/config/app_router.dart index d456ad6..7bd6358 100644 --- a/frontend/lib/config/app_router.dart +++ b/frontend/lib/config/app_router.dart @@ -4,7 +4,6 @@ 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 @@ -15,11 +14,6 @@ import '../screens/auth/parent_register_step2_screen.dart'; import '../screens/auth/parent_register_step3_screen.dart'; import '../screens/auth/parent_register_step4_screen.dart'; import '../screens/auth/parent_register_step5_screen.dart'; -import '../screens/auth/nanny_register_step1_screen.dart'; -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'; @@ -33,7 +27,6 @@ import '../screens/unknown_screen.dart'; // For ShellRoute, creating them here and passing via .value is common. final userRegistrationDataNotifier = UserRegistrationData(); -final nannyRegistrationDataNotifier = NannyRegistrationData(); final amRegistrationDataNotifier = AmRegistrationData(); class AppRouter { @@ -84,44 +77,6 @@ class AppRouter { path: '/parent-register-step5', builder: (BuildContext context, GoRouterState state) => const ParentRegisterStep5Screen(), ), - GoRoute( - path: '/parent-register-confirmation', - builder: (BuildContext context, GoRouterState state) => const NannyRegisterConfirmationScreen(), - ), - ], - ), - - // --- Nanny Registration Flow --- - ShellRoute( - builder: (context, state, child) { - return ChangeNotifierProvider.value( - value: nannyRegistrationDataNotifier, - child: child, - ); - }, - routes: [ - GoRoute( - path: '/nanny-register-step1', - builder: (BuildContext context, GoRouterState state) => const NannyRegisterStep1Screen(), - ), - GoRoute( - path: '/nanny-register-step2', - builder: (BuildContext context, GoRouterState state) => const NannyRegisterStep2Screen(), - ), - GoRoute( - path: '/nanny-register-step3', - builder: (BuildContext context, GoRouterState state) => const NannyRegisterStep3Screen(), - ), - GoRoute( - path: '/nanny-register-step4', - builder: (BuildContext context, GoRouterState state) => const NannyRegisterStep4Screen(), - ), - GoRoute( - path: '/nanny-register-confirmation', - builder: (BuildContext context, GoRouterState state) { - return const NannyRegisterConfirmationScreen(); - }, - ), ], ), diff --git a/frontend/lib/screens/auth/login_screen.dart b/frontend/lib/screens/auth/login_screen.dart index 23d7af1..74c33b1 100644 --- a/frontend/lib/screens/auth/login_screen.dart +++ b/frontend/lib/screens/auth/login_screen.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:flutter/foundation.dart' show kIsWeb; import 'package:url_launcher/url_launcher.dart'; +import 'package:go_router/go_router.dart'; import 'package:p_tits_pas/services/bug_report_service.dart'; import '../../widgets/image_button.dart'; import '../../widgets/custom_app_text_field.dart';