'Having a problem with my Pubspec.yaml file
I do not understand why this error is coming up. all seems well.[![enter image description here][1]][1]
Error detected in pubspec.yaml:
Error on line 61, column 4: Expected a key while parsing a block mapping.
╷
61 │ assets:
│ ^
╵
Please correct the pubspec.yaml file at C:\Users\VICTOR\flutter apps\awsome_app\pubspec.yaml
exit code 1[![enter image description here][3]][3]```
[1]: https://i.stack.imgur.com/qUxuG.png
Solution 1:[1]
The YAML format used in pubspec.yaml cares about indentation. Your assets: declaration has an extra space behind it. Remove that extra space. And make sure the - assets\ is also indented properly.
The lines in VSCode will help you align them properly.
Solution 2:[2]
the pubspec.yaml is a position based script. The vertical lines in visual studio code will tell you the alignment and indentation requirements. The editor is letting you know that the directive is out of position
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Suporte01 |
| Solution 2 | Golden Lion |
