I have given two white spaces for assets and 4 white spaces for the image location but also I am getting the error.
This is my pubspec.yaml
flutter:
uses-material-design: true
assets:
- assets/port.jpeg
I am getting the error
════════ Exception caught by image resource service ════════════════════════════════════════════════
The following assertion was thrown resolving an image codec:
Unable to load asset: assets/port.jpeg
When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 236:49 throw_
packages/flutter/src/services/asset_bundle.dart 227:55 load
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50 <fn>
dart-sdk/lib/async/zone.dart 1362:47 _rootRunUnary
dart-sdk/lib/async/zone.dart 1265:19 runUnary
...
Image provider: AssetImage(bundle: null, name: "assets/port.jpeg")
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#5a8a3(), name: "assets/port.jpeg", scale: 1)
════════════════════════════════════════════════════════════════════════════════════════════════════
This is my directory