问题
Error on line 32, column 5 of pubspec.yaml: A dependency specification must be a string or a mapping. ╷
32 │ ┌ - assets/
33 │ └
╵
pub get failed (65; ╵)
回答1:
The problem is I had the assets folder in the wrong location. It should not be under dependencies.
In addition, you must add 2 spaces before "assets", as shown in the picture:
来源:https://stackoverflow.com/questions/61144571/a-dependency-specification-must-be-a-string-or-a-mapping