Skip to main content

appcraft_unused_assets 0.0.1 copy "appcraft_unused_assets: ^0.0.1" to clipboard
appcraft_unused_assets: ^0.0.1 copied to clipboard

Finds assets that nothing references, by the accessors generated by flutter_gen rather than by string literals of their paths.

0.0.1 #

  • Search for unused assets through the accessors generated by flutter_gen rather than through the string literals of their paths.
  • Usages are read from property reads, from a values read on the class holding an asset, from path literals and from every *.yaml of the project root — so a precached directory, the launcher icon and the splash image are not reported as unused.
  • report, check for CI and clean with --dry-run.
  • Resolution variants are deleted along with the asset they belong to.
  • The report says how many assets it could not examine because the values of their class is read, instead of passing them off as referenced.
  • ignore for the directories addressed by a path built at runtime.
  • The output of flutter_gen is read from the options of its builder in build.yaml — under every key build_runner accepts, with global_options and dev_options taking precedence — as well as from the flutter_gen section of the pubspec.
  • In an app, the code of a file under lib that no file declaring main reaches through imports, exports and parts does not count; entry_points for the apps that start elsewhere. When a reached import or an entry point is missing, no file is taken for dead and the report says which file is missing.
0
likes
160
points
64
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Finds assets that nothing references, by the accessors generated by flutter_gen rather than by string literals of their paths.

Repository (GitHub)
View/report issues

Topics

#assets #cli #flutter-gen #cleanup

License

MIT (license)

Dependencies

analyzer, args, path, yaml

More

Packages that depend on appcraft_unused_assets