missing_name
The 'name' field is required but missing.
Description
#The analyzer produces this diagnostic when there's no top-level name
key. The name
key provides the name of the package, which is required.
Example
#The following code produces this diagnostic because the package doesn't have a name:
yaml
dependencies:
meta: ^1.0.2
Common fixes
#Add the top-level key name
with a value that's the name of the package:
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.