platform_value_disallowed
Keys in the platforms
field can't have values.
Description
#The analyzer produces this diagnostic when a key in the platforms
map has a value. To learn more about specifying your package's supported platforms, check out the documentation on platform declarations.
Example
#The following pubspec.yaml
produces this diagnostic because the key web
has a value.
yaml
name: example
platforms:
web: "chrome"
Common fixes
#Omit the value and leave the key without a value:
yaml
name: example
platforms:
web:
Values for keys in the platforms
field are currently reserved for potential future behavior.
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.