From 36ef0f8d5cd0a213dba0ab38ece33327c2a5546c Mon Sep 17 00:00:00 2001 From: Julien Martin Date: Wed, 28 Jan 2026 16:51:02 +0100 Subject: [PATCH] fix(widgets): Repositionner le toggle et checkbox dans la carte MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Toggle "Il y a un 2ème parent ?" maintenant DANS la carte (pas au-dessus) - Checkbox "Même adresse que parent 1" reste dans la carte - Taille du texte du toggle ajustée à 20px pour cohérence - Espacement de 25px après le toggle Position correcte conforme à l'ancien design. --- .../widgets/personal_info_form_screen.dart | 53 +++++++++---------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/frontend/lib/widgets/personal_info_form_screen.dart b/frontend/lib/widgets/personal_info_form_screen.dart index 50b3cb2..4d56712 100644 --- a/frontend/lib/widgets/personal_info_form_screen.dart +++ b/frontend/lib/widgets/personal_info_form_screen.dart @@ -167,35 +167,6 @@ class _PersonalInfoFormScreenState extends State { textAlign: TextAlign.center, ), const SizedBox(height: 30), - - // Toggle "Il y a un 2ème parent" (uniquement pour Parent 2) - if (widget.showSecondPersonToggle) ...[ - Padding( - padding: EdgeInsets.symmetric(horizontal: screenSize.width * 0.2), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'Il y a un 2ème parent ?', - style: GoogleFonts.merienda(fontSize: 18, fontWeight: FontWeight.w600), - ), - const SizedBox(width: 15), - Switch( - value: _hasSecondPerson, - onChanged: (value) { - setState(() { - _hasSecondPerson = value; - _fieldsEnabled = value; - }); - }, - activeColor: Theme.of(context).primaryColor, - ), - ], - ), - ), - const SizedBox(height: 20), - ], - Container( width: screenSize.width * 0.6, padding: const EdgeInsets.symmetric(vertical: 50, horizontal: 50), @@ -211,6 +182,30 @@ class _PersonalInfoFormScreenState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ + // Toggle "Il y a un 2ème parent" (uniquement pour Parent 2) + if (widget.showSecondPersonToggle) ...[ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Il y a un 2ème parent ?', + style: GoogleFonts.merienda(fontSize: 20, fontWeight: FontWeight.w600), + ), + const SizedBox(width: 15), + Switch( + value: _hasSecondPerson, + onChanged: (value) { + setState(() { + _hasSecondPerson = value; + _fieldsEnabled = value; + }); + }, + activeColor: Theme.of(context).primaryColor, + ), + ], + ), + const SizedBox(height: 25), + ], Row( children: [ Expanded(