feat: harmonisation de la taille de police dans les champs de motivation (étape4 et 5) - Ajout du paramètre fontSize au CustomDecoratedTextField - Taille de police fixée à 18px pour une meilleure lisibilité

This commit is contained in:
Julien Martin
2025-05-12 16:11:12 +02:00
parent 760f4feca3
commit 7707b99773
10 changed files with 138 additions and 92 deletions
@@ -7,6 +7,8 @@ class CustomDecoratedTextField extends StatelessWidget {
final int maxLines;
final double? fieldHeight; // Hauteur optionnelle pour le champ
final bool expandDynamically; // Nouvelle propriété
final bool readOnly;
final double fontSize;
const CustomDecoratedTextField({
super.key,
@@ -15,6 +17,8 @@ class CustomDecoratedTextField extends StatelessWidget {
this.maxLines = 10, // Un nombre raisonnable de lignes par défaut si non dynamique
this.fieldHeight, // Si non fourni, la hauteur sera intrinsèque ou définie par l'image
this.expandDynamically = false, // Par défaut, non dynamique
this.readOnly = false,
this.fontSize = 15.0,
});
@override
@@ -37,11 +41,12 @@ class CustomDecoratedTextField extends StatelessWidget {
controller: controller,
keyboardType: TextInputType.multiline,
maxLines: expandDynamically ? null : maxLines, // S'étend dynamiquement si expandDynamically est true
style: GoogleFonts.merienda(fontSize: 15, color: Colors.black87),
style: GoogleFonts.merienda(fontSize: fontSize, color: Colors.black87),
textAlignVertical: TextAlignVertical.top,
readOnly: readOnly,
decoration: InputDecoration(
hintText: hintText,
hintStyle: GoogleFonts.merienda(fontSize: 15, color: Colors.black54.withOpacity(0.7)),
hintStyle: GoogleFonts.merienda(fontSize: fontSize, color: Colors.black54.withOpacity(0.7)),
border: InputBorder.none, // Pas de bordure pour le TextFormField lui-même
contentPadding: EdgeInsets.zero, // Le padding est géré par le widget Padding externe
// Pour aligner le hintText en haut à gauche