Home > Back-end >  Flutter Image is always Grey instead of original Colors
Flutter Image is always Grey instead of original Colors

Time:04-20

The image is always grey (tried multiple testimages). Size is displaying and its form/outline, but its all Grey instead of the colors in the image used.

class:

class _Language extends State<Language> {  
@override
Widget build(BuildContext context) {
  return const ListTile(
      leading: Icon(Icons.language),
      title: Text('Language'),
      trailing:
          ImageIcon(AssetImage("assets/test.png"), size: 26));
  }
}

pubspec:

flutter:
  uses-material-design: true
  assets:
    - assets/

CodePudding user response:

That is the expected behaviour of ImageIcon class. Please, check the links below.

https://api.flutter.dev/flutter/widgets/ImageIcon-class.html https://github.com/flutter/flutter/issues/81643

  • Related