Flutter error while adding images(assets)

552 Views Asked by At
2

There are 2 best solutions below

0
MuhammedYesilmen On

First of all create a folder in your project named assets, not in your lib folder. After that in pubspace.yaml define your folder like this assets/images/

enter image description here

enter image description here

0
G H Prakash On

You are doing wrong thing in pubspace.yaml. Maintain whitespaces as shown in below

flutter:
  assets:
    - assets/