I searched it on Stackoverflow but regarding flutter, I do not find any relevant solution, here and here may be the same question but they are not for flutter.
I'm using JSON file and register in Pubspec.ymal
but showing error and also when I use an image and register it, the same error also occurs. Maybe there is a formatting mistake in it, but I don't know what is the problem with it.this is the documentation I followed.
Error on line 29, column 5 of pubspec.yaml: Expected a key while parsing a block mapping. assets: ^
This is my pubspec.yaml
file
name: jsondata description: A new Flutter application.
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- loadjson/person.json