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\images\your_app_folder\assets\images
pubspec.yaml:
assets:
- assets/
- assets/images/
Run:
flutter clean
to to clean the intermediate files and refresh.