feat(login): ✨ Ajoutdes champs de formulaire et du bouton de connexion - Images field_email, field_password et btn_green
This commit is contained in:
parent
f4c211e0dd
commit
aaf7070757
@ -51,9 +51,42 @@ class LoginPage extends StatelessWidget {
|
|||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Contenu
|
// Formulaire
|
||||||
const Center(
|
Positioned(
|
||||||
child: Text('Formulaire de connexion à implémenter'),
|
left: leftMargin + imageWidth + (remainingWidth - leftMargin) / 2 - 200,
|
||||||
|
top: h * 0.3,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
// Champ email
|
||||||
|
_ImageTextField(
|
||||||
|
bg: 'assets/images/field_email.png',
|
||||||
|
width: 400,
|
||||||
|
height: 80,
|
||||||
|
hint: 'Email',
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
// Champ mot de passe
|
||||||
|
_ImageTextField(
|
||||||
|
bg: 'assets/images/field_password.png',
|
||||||
|
width: 400,
|
||||||
|
height: 80,
|
||||||
|
hint: 'Mot de passe',
|
||||||
|
obscure: true,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 30),
|
||||||
|
// Bouton de connexion
|
||||||
|
_ImageButton(
|
||||||
|
bg: 'assets/images/btn_green.png',
|
||||||
|
width: 400,
|
||||||
|
height: 80,
|
||||||
|
text: 'Se connecter',
|
||||||
|
onPressed: () {
|
||||||
|
// TODO: Implémenter la logique de connexion
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -137,4 +170,50 @@ class _ImageTextField extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ───────────────────────────────────────────────────────────────
|
||||||
|
// Bouton avec fond image
|
||||||
|
// ───────────────────────────────────────────────────────────────
|
||||||
|
class _ImageButton extends StatelessWidget {
|
||||||
|
final String bg;
|
||||||
|
final double width;
|
||||||
|
final double height;
|
||||||
|
final String text;
|
||||||
|
final VoidCallback onPressed;
|
||||||
|
const _ImageButton({
|
||||||
|
required this.bg,
|
||||||
|
required this.width,
|
||||||
|
required this.height,
|
||||||
|
required this.text,
|
||||||
|
required this.onPressed,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: onPressed,
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Positioned.fill(child: Image.asset(bg, fit: BoxFit.fill)),
|
||||||
|
Center(
|
||||||
|
child: Text(
|
||||||
|
text,
|
||||||
|
style: GoogleFonts.merienda(
|
||||||
|
fontSize: width * 0.045,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -28,6 +28,9 @@ flutter:
|
|||||||
- assets/images/logo.png
|
- assets/images/logo.png
|
||||||
- assets/images/river_logo_desktop.png
|
- assets/images/river_logo_desktop.png
|
||||||
- assets/images/paper2.png
|
- assets/images/paper2.png
|
||||||
|
- assets/images/field_email.png
|
||||||
|
- assets/images/field_password.png
|
||||||
|
- assets/images/btn_green.png
|
||||||
|
|
||||||
fonts:
|
fonts:
|
||||||
- family: Merienda
|
- family: Merienda
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user