fix(auth): Correction des erreurs de compilation
Corrections des appels de méthodes et des types : 1. Parent Steps 1-2 : Passer des objets ParentData complets - updateParent1(ParentData(...)) au lieu de paramètres nommés - updateParent2(ParentData(...)) ou null pour supprimer 2. AM Step 1 : Utiliser la bonne méthode - updateIdentityInfo() au lieu de updatePersonalInfo() 3. personal_info_form_screen : Corrections widgets - Accès correct à widget.stepText - Gestion du nullable sur onChanged de AppCustomCheckbox Ces corrections permettent la compilation sans erreur.
This commit is contained in:
parent
26a0e31b32
commit
f09deb5efc
@ -47,7 +47,7 @@ class AmRegisterStep1Screen extends StatelessWidget {
|
||||
initialData: initialData,
|
||||
previousRoute: '/register-choice',
|
||||
onSubmit: (data, {hasSecondPerson, sameAddress}) {
|
||||
registrationData.updatePersonalInfo(
|
||||
registrationData.updateIdentityInfo(
|
||||
firstName: data.firstName,
|
||||
lastName: data.lastName,
|
||||
phone: data.phone,
|
||||
@ -56,7 +56,6 @@ class AmRegisterStep1Screen extends StatelessWidget {
|
||||
postalCode: data.postalCode,
|
||||
city: data.city,
|
||||
password: '',
|
||||
photoConsent: false,
|
||||
);
|
||||
context.go('/am-register-step2');
|
||||
},
|
||||
|
||||
@ -48,7 +48,7 @@ class ParentRegisterStep1Screen extends StatelessWidget {
|
||||
initialData: initialData,
|
||||
previousRoute: '/register-choice',
|
||||
onSubmit: (data, {hasSecondPerson, sameAddress}) {
|
||||
registrationData.updateParent1(
|
||||
registrationData.updateParent1(ParentData(
|
||||
firstName: data.firstName,
|
||||
lastName: data.lastName,
|
||||
phone: data.phone,
|
||||
@ -57,7 +57,7 @@ class ParentRegisterStep1Screen extends StatelessWidget {
|
||||
postalCode: data.postalCode,
|
||||
city: data.city,
|
||||
password: '',
|
||||
);
|
||||
));
|
||||
context.go('/parent-register-step2');
|
||||
},
|
||||
);
|
||||
|
||||
@ -70,7 +70,7 @@ class ParentRegisterStep2Screen extends StatelessWidget {
|
||||
referenceAddressData: referenceAddress,
|
||||
onSubmit: (data, {hasSecondPerson, sameAddress}) {
|
||||
if (hasSecondPerson == true) {
|
||||
registrationData.updateParent2(
|
||||
registrationData.updateParent2(ParentData(
|
||||
firstName: data.firstName,
|
||||
lastName: data.lastName,
|
||||
phone: data.phone,
|
||||
@ -79,9 +79,9 @@ class ParentRegisterStep2Screen extends StatelessWidget {
|
||||
postalCode: data.postalCode,
|
||||
city: data.city,
|
||||
password: '',
|
||||
);
|
||||
));
|
||||
} else {
|
||||
registrationData.removeParent2();
|
||||
registrationData.updateParent2(null);
|
||||
}
|
||||
context.go('/parent-register-step3');
|
||||
},
|
||||
|
||||
@ -155,7 +155,7 @@ class _PersonalInfoFormScreenState extends State<PersonalInfoFormScreen> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(stepText, style: GoogleFonts.merienda(fontSize: 16, color: Colors.black54)),
|
||||
Text(widget.stepText, style: GoogleFonts.merienda(fontSize: 16, color: Colors.black54)),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
widget.title,
|
||||
@ -283,12 +283,14 @@ class _PersonalInfoFormScreenState extends State<PersonalInfoFormScreen> {
|
||||
AppCustomCheckbox(
|
||||
label: 'Même adresse que le parent 1',
|
||||
value: _sameAddress,
|
||||
onChanged: _fieldsEnabled ? (value) {
|
||||
onChanged: (value) {
|
||||
if (_fieldsEnabled) {
|
||||
setState(() {
|
||||
_sameAddress = value ?? false;
|
||||
_updateAddressFields();
|
||||
});
|
||||
} : null,
|
||||
}
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user