diff --git a/frontend/lib/screens/auth/login_screen.dart b/frontend/lib/screens/auth/login_screen.dart index 6468a02..48df1bd 100644 --- a/frontend/lib/screens/auth/login_screen.dart +++ b/frontend/lib/screens/auth/login_screen.dart @@ -51,9 +51,42 @@ class LoginPage extends StatelessWidget { fit: BoxFit.contain, ), ), - // Contenu - const Center( - child: Text('Formulaire de connexion à implémenter'), + // Formulaire + Positioned( + 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, + ), + ), + ), + ], + ), + ), + ), + ); + } } \ No newline at end of file diff --git a/frontend/pubspec.yaml b/frontend/pubspec.yaml index 2bfc58b..cbf80a7 100644 --- a/frontend/pubspec.yaml +++ b/frontend/pubspec.yaml @@ -28,6 +28,9 @@ flutter: - assets/images/logo.png - assets/images/river_logo_desktop.png - assets/images/paper2.png + - assets/images/field_email.png + - assets/images/field_password.png + - assets/images/btn_green.png fonts: - family: Merienda