fix(router): Mise à jour du routeur principal
- 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.
This commit is contained in:
parent
21430dca41
commit
26a0e31b32
@ -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<AmRegistrationData>.value(
|
||||
value: amRegistrationDataNotifier,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
routes: <RouteBase>[
|
||||
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(),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user