I have added my asset files in my projects root directory, which contains images, fonts and sounds.
added the assets in pubspec.yml file like this:
flutter:
uses-material-design: true
assets:
- assets/images/
Then I try to add an image through Image.asset like code below:
Scaffold(
appBar: AppBar(
leading: Align(
alignment: Alignment.centerRight,
child: Text(
"Uber",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.w400
),
)
),
),
body: Column(
children: [
Text(
"riyad",
style: TextStyle(color: Colors.black),
),
Image.asset("car_android.png") <-- this like
],
),
);
but it shows me exception that failed to load asset:
The following assertion was thrown resolving an image codec: Unable to load asset: car_android.png"
My traceback exception:
════════ Exception caught by image resource service ════════════════════════════
The following assertion was thrown resolving an image codec:
Unable to load asset: car_android.png
When the exception was thrown, this was the stack
#0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:224:7)
<asynchronous suspension>
#1 AssetBundleImageProvider._loadAsync (package:flutter/src/painting/image_provider.dart:672:14)
<asynchronous suspension>
Image provider: AssetImage(bundle: null, name: "car_android.png")
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#243b1(), name: "car_android.png", scale: 1.0)
I tried to run command flutter clean command to clean the cache, then run the app again, but the same problems occurs again, that it fails to load asset. I am new to flutter please provide descriptory answers and also suggest me some blogs to read


