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, + ), ), ), ),