Asset Validator is a Visual Studio Code extension designed to help Flutter developers ensure that their declared assets in pubspec.yaml are correctly placed in the project directory and are actively used in the codebase. The extension checks for missing and unused assets, providing a clear output for developers.
Features
Check Asset Placement: Validates that all declared assets exist in the specified directories.
Check Asset Usage: Scans the project files to ensure that all declared assets are used in the code.
Real-time Progress Updates: Displays progress notifications while validating assets, helping users track the validation process.
Clear Output Logs: Outputs structured results in a dedicated output channel, highlighting missing and unused assets.
Easy Integration: Simple command to initiate validation with no configuration needed.
Installation
Open the Extensions view in VS Code (Ctrl+Shift+X or Cmd+Shift+X on Mac).
Search for Asset Validator.
Click Install.
Usage
Ensure you have a pubspec.yaml file in your Flutter project with declared assets.
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on Mac).
Type and select Asset Validator: Validate to run the validation process.
Check the output channel for results regarding missing and unused assets.
Output
The extension provides feedback in the output channel, detailing: