this is the problem that I'm facing right now. I have a folder named 'assets' and inside that folder I have an image named 'no_icon.png'. I have added this to the pubspec.yaml like this:
flutter:
assets:
- assets/teamShields/
- assets/no_icon.png
And when I do inside a StatelessWidget
final imageP = File('assets/no_icon.png');
and then inside this and a MaterialApp:
body: Text(imageP.existsSync().toString()),
I always see false on my screen.
Also, if I type Image.asset('assets/no_icon.png'),
instead of Text I can see the image rendered.
I don't know if this is a bug or it's something I'm doing wrong...