Skip to main content

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

CLI and analyzer plugin that finds Color.red style references a context type already supplies and rewrites them to the .red dot shorthand form.

example/lib/dot_shorthand_example.dart

enum Color { red, green }

class Plain {
  const Plain(this.value);
  final int value;
}

final Color shorthand = .red;
final Color kept = Color.green; // dot_shorthand: ignore
final Plain unnamed = Plain(1);
1
likes
0
points
3.43k
downloads

Publisher

unverified uploader

Weekly Downloads

CLI and analyzer plugin that finds Color.red style references a context type already supplies and rewrites them to the .red dot shorthand form.

Repository (GitHub)
View/report issues

Topics

#lint #analyzer-plugin #refactoring #codemod #dot-shorthands

License

unknown (license)

Dependencies

analysis_server_plugin, analyzer, analyzer_plugin, args, glob, path

More

Packages that depend on dot_shorthand