asset_ field_ not_ list
The value of the 'assets' field is expected to be a list of relative file paths.
Description
#
The analyzer produces this diagnostic when the value of the
assets
key
isn't a list.
Example
#
The following code produces this diagnostic because the value of the
assets
key is a string when a list is expected:
name: example
flutter:
assets: assets/
Common fixes
#Change the value of the asset list so that it's a list:
name: example
flutter:
assets:
- assets/
Unless stated otherwise, the documentation on this site reflects Dart 3.9.2. Page last updated on 2025-9-4. View source or report an issue.