asset_directory_does_not_exist
The asset directory '{0}' doesn't exist.
Description
#The analyzer produces this diagnostic when an asset list contains a value referencing a directory that doesn't exist.
Example
#Assuming that the directory assets
doesn't exist, the following code produces this diagnostic because it's listed as a directory containing assets:
yaml
name: example
flutter:
assets:
- assets/
Common fixes
#If the path is correct, then create a directory at that path.
If the path isn't correct, then change the path to match the path of the directory containing the assets.
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.