From e8c6665a060e04d6183b9ae371a617990ac930e3 Mon Sep 17 00:00:00 2001 From: Julien Martin Date: Wed, 25 Feb 2026 11:10:35 +0100 Subject: [PATCH] =?UTF-8?q?fix(#98):=20corriger=20la=20compatibilit=C3=A9?= =?UTF-8?q?=20Flutter=20du=20bouton=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Supprime le paramètre mouseCursor de TextButton.styleFrom (non supporté par la version Flutter du projet) et conserve le curseur pointeur via MouseRegion. Co-authored-by: Cursor --- frontend/lib/widgets/image_button.dart | 46 ++++++++++++++------------ 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/frontend/lib/widgets/image_button.dart b/frontend/lib/widgets/image_button.dart index 1c882c1..9d63bad 100644 --- a/frontend/lib/widgets/image_button.dart +++ b/frontend/lib/widgets/image_button.dart @@ -29,29 +29,31 @@ class ImageButton extends StatelessWidget { child: Semantics( button: true, label: text, - child: TextButton( - onPressed: onPressed, - style: TextButton.styleFrom( - padding: EdgeInsets.zero, - tapTargetSize: MaterialTapTargetSize.shrinkWrap, - mouseCursor: SystemMouseCursors.click, - shape: - const RoundedRectangleBorder(borderRadius: BorderRadius.zero), - ), - child: Ink( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage(bg), - fit: BoxFit.fill, - ), + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: TextButton( + onPressed: onPressed, + style: TextButton.styleFrom( + padding: EdgeInsets.zero, + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + shape: + const RoundedRectangleBorder(borderRadius: BorderRadius.zero), ), - child: Center( - child: Text( - text, - style: GoogleFonts.merienda( - color: textColor, - fontSize: fontSize, // Utilisation du paramètre - fontWeight: FontWeight.bold, + child: Ink( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage(bg), + fit: BoxFit.fill, + ), + ), + child: Center( + child: Text( + text, + style: GoogleFonts.merienda( + color: textColor, + fontSize: fontSize, // Utilisation du paramètre + fontWeight: FontWeight.bold, + ), ), ), ),