feat: Implement multi-step registration for Childminder with data validation and summary display
- Added routes for registration steps 2, 3, and 4 in app_router.dart. - Created AmRegisterStep2Screen for entering professional details including birth date, city, country, social security number, agreement number, and max children. - Implemented validation for social security number and max children fields. - Developed AmRegisterStep3Screen for entering a motivation message and accepting terms and conditions. - Created AmRegisterStep4Screen to display a summary of the registration data for review before submission. - Introduced SummaryCard widget for displaying user information in a structured format. - Enhanced DataGenerator utility to provide realistic data for testing.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:p_tits_pas/models/am_user_registration_data.dart';
|
||||
import 'package:p_tits_pas/screens/auth/am/am_register_step1_sceen.dart';
|
||||
import 'package:p_tits_pas/screens/auth/am/am_register_step2_sceen.dart';
|
||||
import 'package:p_tits_pas/screens/auth/am/am_register_step3_sceen.dart';
|
||||
import 'package:p_tits_pas/screens/auth/am/am_register_step4_sceen.dart';
|
||||
import '../screens/auth/login_screen.dart';
|
||||
import '../screens/auth/register_choice_screen.dart';
|
||||
import '../screens/auth/parent/parent_register_step1_screen.dart';
|
||||
@@ -21,6 +25,9 @@ class AppRouter {
|
||||
static const String parentRegisterStep5 = '/parent-register/step5';
|
||||
|
||||
static const String amRegisterStep1 = '/am-register/step1';
|
||||
static const String amRegisterStep2 = '/am-register/step2';
|
||||
static const String amRegisterStep3 = '/am-register/step3';
|
||||
static const String amRegisterStep4 = '/am-register/step4';
|
||||
static const String home = '/home';
|
||||
|
||||
static Route<dynamic> generateRoute(RouteSettings settings) {
|
||||
@@ -81,6 +88,30 @@ class AppRouter {
|
||||
screen = const AmRegisterStep1Screen();
|
||||
slideTransition = true;
|
||||
break;
|
||||
case amRegisterStep2:
|
||||
if (args is ChildminderRegistrationData) {
|
||||
screen = AmRegisterStep2Screen(registrationData: args);
|
||||
} else {
|
||||
screen = AmRegisterStep2Screen(registrationData: ChildminderRegistrationData());
|
||||
}
|
||||
slideTransition = true;
|
||||
break;
|
||||
case amRegisterStep3:
|
||||
if (args is ChildminderRegistrationData) {
|
||||
screen = AmRegisterStep3Screen(registrationData: args);
|
||||
} else {
|
||||
screen = AmRegisterStep3Screen(registrationData: ChildminderRegistrationData());
|
||||
}
|
||||
slideTransition = true;
|
||||
break;
|
||||
case amRegisterStep4:
|
||||
if (args is ChildminderRegistrationData) {
|
||||
screen = AmRegisterStep4Screen(registrationData: args);
|
||||
} else {
|
||||
screen = AmRegisterStep4Screen(registrationData: ChildminderRegistrationData());
|
||||
}
|
||||
slideTransition = true;
|
||||
break;
|
||||
case home:
|
||||
screen = const HomeScreen();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user