I have added my assets into my projects directory also did everything on pubspec.yaml
but I am still getting the Unable to load asset.
I also tried giving a specific path (like - assets/image/x.png
) in pubspec, but nothing changed.
What am I doing wrong?
I used it like this
pubspec.yaml
assets folder
@vinternal 只需停止并再次运行应用程序。
Turns out i forgot to put a - before family: Roboto. Just fixed it
You should carefully follow the structure:
Hey put the assets folder in root folder, I think you have put it under lib folder.
Intendation(space) before the -asset/images in pubspec.yaml should not be changed otherwise it may have issue
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.