flutter_sweeper 1.0.0
flutter_sweeper: ^1.0.0 copied to clipboard
Interactive CLI that finds unused assets, Dart files, classes, functions and methods in Flutter projects and lets you keep or delete each one safely.
Changelog #
1.0.0 #
- Initial release.
fsweep/flutter_sweeperexecutables.- Unused asset detection: pubspec declarations, undeclared files in asset folders, resolution variants, tool configs and flutter_gen getters.
- Unreferenced Dart file detection through an import/export/part graph, including conditional imports; part files are deleted with their library.
- AST-based detection of unused classes, mixins, enums, typedefs, top-level functions and methods.
- Interactive Keep / Delete / Delete all remaining / Skip all workflow with code previews.
- Safe declaration removal that keeps doc comments and annotations together and refuses edits that would add syntax errors.
--dry-run,--assets-only,--code-only,--exclude,--[no-]methodsand--pathflags.- Optional
flutter_sweeper.yamlconfig plus// flutter_sweeper:keepand// flutter_sweeper:ignore_filemarkers. - Works with
package:analyzer6.x through 14.x, so it installs on Dart 3.0 and on the latest SDKs. - Programmatic API with a runnable example in
example/example.dart.