dependencies_field_not_map
The value of the '{0}' field is expected to be a map.
Description
#The analyzer produces this diagnostic when the value of either the dependencies
or dev_dependencies
key isn't a map.
Example
#The following code produces this diagnostic because the value of the top-level dependencies
key is a list:
yaml
name: example
dependencies:
- meta
Common fixes
#Use a map as the value of the dependencies
key:
yaml
name: example
dependencies:
meta: ^1.0.2
Was this page's content helpful?
Thank you for your feedback!
Provide details Thank you for your feedback! Please let us know what we can do to improve.
Provide details Unless stated otherwise, the documentation on this site reflects Dart 3.8.1. Page last updated on 2025-05-08. View source or report an issue.