Flutter Tidy
Flutter Tidy is a VSCode extension that helps you maintain a clean Flutter project by identifying and removing unused resources.
Features
1. Unused Assets Detection
- Scans your project for unused image files, icons, and other assets
- Identifies assets defined in
pubspec.yaml but not referenced in code
- Helps reduce app size by removing unnecessary resources
2. Unused Dependencies Detection
- Analyzes
pubspec.yaml to find unused package dependencies
- Helps maintain a lean dependency tree
- Improves build time by removing unnecessary packages
3. Unused Files Detection
- Identifies Dart files that are not referenced anywhere in your project
- Considers various Dart file relationships:
- Import statements
- Export statements
- Part/Part of relationships
- Library declarations
- Helps keep your codebase clean and maintainable
Usage
- Open your Flutter project in VSCode
- Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Type "Flutter Tidy" to see available commands:
Flutter Tidy: Analyze All
Flutter Tidy: Analyze Unused Assets
Flutter Tidy: Analyze Unused Dependencies
Flutter Tidy: Analyze Unused Files
Requirements
- Visual Studio Code version 1.99.0 or higher
- Flutter project with a valid
pubspec.yaml file
Known Issues
Please report any issues on our GitHub repository.
Release Notes
0.0.4
Improved Asset Analysis System:
- Enhanced detection of assets used in both direct references and static variables
- Fixed issues with false-positive unused asset detection
- Improved performance with optimized file analysis
- Better handling of various string literal formats in asset references
0.0.1
Initial release of Flutter Tidy with core features:
- Unused assets detection
- Unused dependencies detection
- Unused files detection
| |