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:
parent
a4e6cfc50e
commit
e8c6665a06
@ -29,12 +29,13 @@ class ImageButton extends StatelessWidget {
|
|||||||
child: Semantics(
|
child: Semantics(
|
||||||
button: true,
|
button: true,
|
||||||
label: text,
|
label: text,
|
||||||
|
child: MouseRegion(
|
||||||
|
cursor: SystemMouseCursors.click,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
mouseCursor: SystemMouseCursors.click,
|
|
||||||
shape:
|
shape:
|
||||||
const RoundedRectangleBorder(borderRadius: BorderRadius.zero),
|
const RoundedRectangleBorder(borderRadius: BorderRadius.zero),
|
||||||
),
|
),
|
||||||
@ -58,6 +59,7 @@ class ImageButton extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user