fix(#98): corriger la compatibilité Flutter du bouton image

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 <cursoragent@cursor.com>
This commit is contained in:
MARTIN Julien 2026-02-25 11:10:35 +01:00
parent a4e6cfc50e
commit e8c6665a06

View File

@ -29,29 +29,31 @@ class ImageButton extends StatelessWidget {
child: Semantics( child: Semantics(
button: true, button: true,
label: text, label: text,
child: TextButton( child: MouseRegion(
onPressed: onPressed, cursor: SystemMouseCursors.click,
style: TextButton.styleFrom( child: TextButton(
padding: EdgeInsets.zero, onPressed: onPressed,
tapTargetSize: MaterialTapTargetSize.shrinkWrap, style: TextButton.styleFrom(
mouseCursor: SystemMouseCursors.click, padding: EdgeInsets.zero,
shape: tapTargetSize: MaterialTapTargetSize.shrinkWrap,
const RoundedRectangleBorder(borderRadius: BorderRadius.zero), shape:
), const RoundedRectangleBorder(borderRadius: BorderRadius.zero),
child: Ink(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(bg),
fit: BoxFit.fill,
),
), ),
child: Center( child: Ink(
child: Text( decoration: BoxDecoration(
text, image: DecorationImage(
style: GoogleFonts.merienda( image: AssetImage(bg),
color: textColor, fit: BoxFit.fill,
fontSize: fontSize, // Utilisation du paramètre ),
fontWeight: FontWeight.bold, ),
child: Center(
child: Text(
text,
style: GoogleFonts.merienda(
color: textColor,
fontSize: fontSize, // Utilisation du paramètre
fontWeight: FontWeight.bold,
),
), ),
), ),
), ),