I'm constantly getting this error saying:
The following assertion was thrown resolving an image codec: Unable to load asset: ../images/mall.png
Even though the YAML file is correct.
This is my pubspec.yaml
environment:
sdk: ">=2.18.0-10.0.dev <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- images/
Create a folder named as assets in PROJECT DIRECTORY not in lib or some other folder. Drag and drop your image into assets folder. Now your pubspec.yaml would be like
assets: