'ImageIcon is not setting given color on safari, it shows black icon

Below is my sample code :

  _getIcon(String iconName, {color}) {

    return Container(
        child: ImageIcon(
      AssetImage('assets/images/' + iconName),
      color: color,
    ));
  }

i am calling it as :

_getIcon("sampleImage.png", Color("0xFF0065A3"))

Above code works perfectly fine on chrome , but it's not setting given color on safari. It shows black icon.

Below is my build command :

flutter build web --no-sound-null-safety --web-renderer html

Please help me



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source