dot_shorthand 1.0.0
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);