refactor(inscription): Refonte complète du processus d'inscription - Modèles etdonnées: Suppression de placeholder_registration_data.dart, ajout de user_registration_data.dart, data_generator.dart et card_assets.dart - Interface utilisateur: Refonte des écrans d'inscription, amélioration des widgets, ajout de cartes colorées - Assets: Ajout de nouvelles cartes colorées - Configuration: Mise à jour de pubspec.yaml et app_router.dart
This commit is contained in:
@@ -51,7 +51,7 @@ class AppCustomCheckbox extends StatelessWidget {
|
||||
Flexible(
|
||||
child: Text(
|
||||
label,
|
||||
style: GoogleFonts.merienda(fontSize: 14),
|
||||
style: GoogleFonts.merienda(fontSize: 16),
|
||||
overflow: TextOverflow.ellipsis, // Gérer le texte long
|
||||
),
|
||||
),
|
||||
|
||||
@@ -12,8 +12,8 @@ class CustomAppTextField extends StatefulWidget {
|
||||
final TextEditingController controller;
|
||||
final String labelText;
|
||||
final String hintText;
|
||||
final double fieldHeight;
|
||||
final double fieldWidth;
|
||||
final double fieldHeight;
|
||||
final bool obscureText;
|
||||
final TextInputType keyboardType;
|
||||
final String? Function(String?)? validator;
|
||||
@@ -23,14 +23,16 @@ class CustomAppTextField extends StatefulWidget {
|
||||
final bool readOnly;
|
||||
final VoidCallback? onTap;
|
||||
final IconData? suffixIcon;
|
||||
final double labelFontSize;
|
||||
final double inputFontSize;
|
||||
|
||||
const CustomAppTextField({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.labelText,
|
||||
this.hintText = '',
|
||||
this.fieldHeight = 50.0,
|
||||
this.fieldWidth = 300.0,
|
||||
this.fieldHeight = 53.0,
|
||||
this.obscureText = false,
|
||||
this.keyboardType = TextInputType.text,
|
||||
this.validator,
|
||||
@@ -40,6 +42,8 @@ class CustomAppTextField extends StatefulWidget {
|
||||
this.readOnly = false,
|
||||
this.onTap,
|
||||
this.suffixIcon,
|
||||
this.labelFontSize = 18.0,
|
||||
this.inputFontSize = 18.0,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -61,6 +65,10 @@ class _CustomAppTextFieldState extends State<CustomAppTextField> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const double fontHeightMultiplier = 1.2;
|
||||
const double internalVerticalPadding = 16.0;
|
||||
final double dynamicFieldHeight = widget.fieldHeight;
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -68,7 +76,7 @@ class _CustomAppTextFieldState extends State<CustomAppTextField> {
|
||||
Text(
|
||||
widget.labelText,
|
||||
style: GoogleFonts.merienda(
|
||||
fontSize: 14,
|
||||
fontSize: widget.labelFontSize,
|
||||
color: Colors.black87,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
@@ -76,7 +84,7 @@ class _CustomAppTextFieldState extends State<CustomAppTextField> {
|
||||
const SizedBox(height: 6),
|
||||
SizedBox(
|
||||
width: widget.fieldWidth,
|
||||
height: widget.fieldHeight,
|
||||
height: dynamicFieldHeight,
|
||||
child: Stack(
|
||||
alignment: Alignment.centerLeft,
|
||||
children: [
|
||||
@@ -87,7 +95,7 @@ class _CustomAppTextFieldState extends State<CustomAppTextField> {
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 18.0, right: 18.0, bottom: 2.0),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 18.0, vertical: 8.0),
|
||||
child: TextFormField(
|
||||
controller: widget.controller,
|
||||
obscureText: widget.obscureText,
|
||||
@@ -95,7 +103,10 @@ class _CustomAppTextFieldState extends State<CustomAppTextField> {
|
||||
enabled: widget.enabled,
|
||||
readOnly: widget.readOnly,
|
||||
onTap: widget.onTap,
|
||||
style: GoogleFonts.merienda(fontSize: 15, color: widget.enabled ? Colors.black87 : Colors.grey),
|
||||
style: GoogleFonts.merienda(
|
||||
fontSize: widget.inputFontSize,
|
||||
color: widget.enabled ? Colors.black87 : Colors.grey
|
||||
),
|
||||
validator: widget.validator ??
|
||||
(value) {
|
||||
if (!widget.enabled || widget.readOnly) return null;
|
||||
@@ -106,13 +117,13 @@ class _CustomAppTextFieldState extends State<CustomAppTextField> {
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
hintText: widget.hintText,
|
||||
hintStyle: GoogleFonts.merienda(fontSize: 15, color: Colors.black54.withOpacity(0.7)),
|
||||
hintStyle: GoogleFonts.merienda(fontSize: widget.inputFontSize, color: Colors.black54.withOpacity(0.7)),
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.zero,
|
||||
contentPadding: EdgeInsets.zero,
|
||||
suffixIcon: widget.suffixIcon != null
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(right: 0.0),
|
||||
child: Icon(widget.suffixIcon, color: Colors.black54, size: 20),
|
||||
child: Icon(widget.suffixIcon, color: Colors.black54, size: widget.inputFontSize * 1.1),
|
||||
)
|
||||
: null,
|
||||
isDense: true,
|
||||
|
||||
Reference in New Issue
Block a user