dot_shorthand 1.1.2
dot_shorthand: ^1.1.2 copied to clipboard
Migrate Dart code to dot shorthands (Color.red -> .red). CLI batch rewrite plus an analyzer plugin with a quick fix.
Use this package as an executable
Install it
You can install the package from the command line:
dart pub global activate dot_shorthandUse it
The package has the following executables:
$ dot_shorthand
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add dot_shorthandWith Flutter:
$ flutter pub add dot_shorthandThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
dot_shorthand: ^1.1.2Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:dot_shorthand/dot_shorthand.dart';