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:
@@ -6,6 +6,7 @@ import 'package:p_tits_pas/widgets/app_custom_checkbox.dart'; // Import de la ch
|
||||
// import 'package:p_tits_pas/models/placeholder_registration_data.dart'; // Remplacé
|
||||
import '../../models/user_registration_data.dart'; // Import du vrai modèle
|
||||
import '../../utils/data_generator.dart'; // Import du générateur
|
||||
import '../../models/card_assets.dart'; // Import des enums de cartes
|
||||
|
||||
class ParentRegisterStep4Screen extends StatefulWidget {
|
||||
final UserRegistrationData registrationData; // Accepte les données
|
||||
@@ -100,11 +101,9 @@ Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lo
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final screenSize = MediaQuery.of(context).size;
|
||||
// Calculer la largeur disponible pour le contenu principal de la colonne
|
||||
// La SingleChildScrollView a un padding horizontal de 50.0 de chaque côté.
|
||||
final availableContentWidth = screenSize.width - (50.0 * 2);
|
||||
// Définir la taille du champ de texte carré comme un pourcentage de cette largeur disponible
|
||||
final textFieldSize = (availableContentWidth * 0.65) / 2; // Réduction de la taille par deux
|
||||
final cardWidth = screenSize.width * 0.6; // Largeur de la carte (60% de l'écran)
|
||||
final double imageAspectRatio = 2.0; // Ratio corrigé (1024/512 = 2.0)
|
||||
final cardHeight = cardWidth / imageAspectRatio;
|
||||
|
||||
return Scaffold(
|
||||
body: Stack(
|
||||
@@ -120,7 +119,7 @@ Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lo
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Étape 4/5', // Supposant 5 étapes au total pour l'instant
|
||||
'Étape 4/5',
|
||||
style: GoogleFonts.merienda(fontSize: 16, color: Colors.black54),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
@@ -130,37 +129,53 @@ Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lo
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
SizedBox(
|
||||
width: textFieldSize,
|
||||
height: textFieldSize,
|
||||
child: CustomDecoratedTextField(
|
||||
controller: _motivationController,
|
||||
hintText: 'Écrivez ici pour motiver votre demande...',
|
||||
fieldHeight: textFieldSize,
|
||||
maxLines: 10,
|
||||
expandDynamically: true,
|
||||
Container(
|
||||
width: cardWidth,
|
||||
height: cardHeight,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(CardColorHorizontal.green.path),
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(40.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: CustomDecoratedTextField(
|
||||
controller: _motivationController,
|
||||
hintText: 'Écrivez ici pour motiver votre demande...',
|
||||
fieldHeight: cardHeight * 0.6,
|
||||
maxLines: 10,
|
||||
expandDynamically: true,
|
||||
fontSize: 18.0,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (!_cguAccepted) {
|
||||
_showCGUModal();
|
||||
}
|
||||
},
|
||||
child: AppCustomCheckbox(
|
||||
label: 'J\'accepte les conditions générales d\'utilisation',
|
||||
value: _cguAccepted,
|
||||
onChanged: (newValue) {
|
||||
if (!_cguAccepted) {
|
||||
_showCGUModal();
|
||||
} else {
|
||||
setState(() => _cguAccepted = false);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (!_cguAccepted) {
|
||||
_showCGUModal();
|
||||
}
|
||||
},
|
||||
child: AppCustomCheckbox(
|
||||
label: 'J\'accepte les conditions générales d\'utilisation',
|
||||
value: _cguAccepted,
|
||||
onChanged: (newValue) {
|
||||
if (!_cguAccepted) {
|
||||
_showCGUModal();
|
||||
} else {
|
||||
setState(() => _cguAccepted = false);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 40),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user