I'm developing a flutter web, and I checked on the mobile web that the color of the icon image is strange.
IconButton(
onPressed: () {},
icon: ImageIcon(
AssetImage('assets/images/heart_selected.png'),
color: Colors.redAccent,
),
),
I'm printing the heart icon as below, and the color of the icon should be 'redAccent' as set in the code.
And when I checked on the web, it was printed well. However, when viewed on the mobile web, it is output only in black, not in the set color. (the same goes for other colors.) Perhaps the color of the icon image has not been changed at all.
There is no problem with the flutter icon widget. May I know the cause of this?
Thank you.
Aucun commentaire:
Enregistrer un commentaire