The dart fix
command finds and fixes two types of issues:
- Analysis issues that have associated automated fixes (sometimes called quick-fixes or code actions)
- Issues that have associated package API migration information
To preview proposed changes, use the --dry-run
flag:
$ dart fix --dry-run
To apply the proposed changes, use the --apply
flag:
$ dart fix --apply
For information about how automated package API changes work, see dart.dev/go/dart-fix.
The dart fix
command replaces dartfix
.