Skip to main content

flutter_sweeper 1.0.0 copy "flutter_sweeper: ^1.0.0" to clipboard
flutter_sweeper: ^1.0.0 copied to clipboard

discontinuedreplaced by: flutter_trim

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_sweeper executables.
  • 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-]methods and --path flags.
  • Optional flutter_sweeper.yaml config plus // flutter_sweeper:keep and // flutter_sweeper:ignore_file markers.
  • Works with package:analyzer 6.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.
1
likes
160
points
59
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Interactive CLI that finds unused assets, Dart files, classes, functions and methods in Flutter projects and lets you keep or delete each one safely.

Repository (GitHub)
View/report issues
Contributing

Topics

#flutter #cli #cleanup #assets #code-quality

License

MIT (license)

Dependencies

analyzer, args, glob, mason_logger, path, yaml

More

Packages that depend on flutter_sweeper