yaml extension error ( Incorrect type. Expected "string".yaml-schema: pubspec.yaml )


enter image description here

Recently i created a flutter project and open the "YAML" ,getting some error from "YAML" extension , How can i solve this , is the only solution uninstall the extension or how to overcome this without uninstalling this extension

tried flutter clean , repair etc….. but nothing was helpful ,

getting error are

1 Incorrect type. Expected "string".yaml-schema: pubspec.yaml

2 Property flutter is not allowed.yaml-schema: pubspec.yaml

3 Property cupertino_icons is not allowed.yaml-schema: pubspec.yaml

4 Property flutter_test is not allowed.yaml-schema: pubspec.yaml

5 ect……..

using flutter version is 2.8.1

"YAML"(extension) version v1.5.0


Please update VSCode’s YAML extension to at least 1.5.1 to resolve the error. Flutter will work as it is with the errors too.

Answered By – Usama Karim

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published