skip to Main Content

Image.asset( 'assets/icons/instagram.png', color: Color.fromRGBO(16, 42, 67, 1), ),

Image not loading.

enter image description here

Error

═══════ Exception caught by image resource service ════════════════════════════
The following assertion was thrown resolving an image codec:
Unable to load asset: "assets/icons/instagram.png".
Exception: Asset not found

checked pubspec.yaml and check the way I’m adding the image

2

Answers


  1. Chosen as BEST ANSWER

    I added other images(same file name) and it started working, I guess it was something about the images.


  2. As per the error details, please try re-running(not just Hot Reload or Hot Restart) the application. This error may occur when changes are made to the asset folder, such as adding or removing images. Ensure that you’ve correctly added or removed assets in your project and then re-run the application.

    Happy Codding.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search