Flutter: Unable to load asset Image provider: AssetImage(bundle: null, name: "assets/images/rose.jpg")

Solution 1:

Run flutter clean and run again.

Solution 2:

Your assets folder is in the right place which is in the root of your project folder.

The error is because you're using the image Provider AssetImage instead of Image.asset("assets/images/rose.jpg").

After making changes to your image asset, make sure you save it to automatically retrieve the new image dependency or run $ flutter pub get.

Also check that you've added the image path to the assets subsection in your pubspec.yaml like this:

flutter: 

 assets:
    - assets/images/rose.jpg