fix(#156): caler la modale AM sur les TF et unifier create/review.

ValidationFormMetrics (titres, TF, écarts) pilote la hauteur ; photo
étirée sur le corps ; mêmes widgets create et validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-23 16:49:59 +02:00
co-authored by Cursor
parent e3552667bc
commit 8ee2ca8ea6
5 changed files with 272 additions and 162 deletions
@@ -68,7 +68,9 @@ class IdentityValues {
/// Bloc identité : Nom/Prénom, Tél/Email, Adresse, CP/Ville.
/// Grille partagée (création de compte, validation AM/famille, fiches admin, etc.).
class IdentityBlock extends StatelessWidget { final String? title;
class IdentityBlock extends StatelessWidget {
final String? title;
final bool expandVertically;
final String? _nom;
final String? _prenom;
@@ -92,6 +94,7 @@ class IdentityBlock extends StatelessWidget { final String? title;
const IdentityBlock.readOnly({
super.key,
this.title,
this.expandVertically = false,
required String nom,
required String prenom,
required String telephone,
@@ -117,6 +120,7 @@ class IdentityBlock extends StatelessWidget { final String? title;
const IdentityBlock.editable({
super.key,
this.title,
this.expandVertically = false,
required TextEditingController nomController,
required TextEditingController prenomController,
required TextEditingController telephoneController,
@@ -143,11 +147,13 @@ class IdentityBlock extends StatelessWidget { final String? title;
factory IdentityBlock.readOnlyValues({
Key? key,
String? title,
bool expandVertically = false,
required IdentityValues values,
}) {
return IdentityBlock.readOnly(
key: key,
title: title,
expandVertically: expandVertically,
nom: values.nom,
prenom: values.prenom,
telephone: values.telephone,
@@ -164,10 +170,12 @@ class IdentityBlock extends StatelessWidget { final String? title;
Key? key,
String? title,
String emptyLabel = 'Non défini',
bool expandVertically = false,
}) {
return IdentityBlock.readOnlyValues(
key: key,
title: title,
expandVertically: expandVertically,
values: IdentityValues.fromUser(user, emptyLabel: emptyLabel),
);
}
@@ -197,6 +205,7 @@ class IdentityBlock extends StatelessWidget { final String? title;
title: title,
rowLayout: rowLayout,
rowFlex: rowFlex,
expandVertically: expandVertically,
fields: [
ValidationLabeledField(
label: 'Nom',
@@ -243,6 +252,7 @@ class IdentityBlock extends StatelessWidget { final String? title;
title: title,
rowLayout: rowLayout,
rowFlex: rowFlex,
expandVertically: expandVertically,
fields: [
ValidationLabeledField(
label: 'Nom',