Flutter "Unable to load asset" error, although everything looks good

Viewed 60

So I got the "Unable to load asset" error on an image, although everything looks good to me, tried running flutter clean in the terminal but it didn't fix the issue. Any suggestions?

PS: adding the file extension in the widget doesn't solve the issue

This is the error

Project Tree

This is the pubspec

This is the code

2 Answers

Use full path, .png is missing

AssetImage('assets/images/image.png')

In the image name, you forgot the .png . So do this

AssetImage("assets/images/White-E-Journal.png")

instead of

AssetImage("assets/images/White-E-Journal")
Related