image not displaying in flutter app. But I got some errors in debug console.
I/FlutterActivityDelegate(22603): onResume setting current activity to this
I/Fl
Make sure your image folder is in project folder.
Make sure the folder you are referring in Image.asset contains the file.
For example:
Image.asset(
"./assets/images/loading.gif",
height: 125.0,
width: 125.0,
)
The folder should be:
C:\your_app_folder\assets\images
pubspec.yaml:
assets:
- assets/
- assets/images/
Run flutter clean to clean the intermediate files and refresh.
my problem was indentation of assets section. I wrote it at the beginning of the line, whereas it should be indented with a Tab after flutter: section.
Robie