Like dartfmt.
But better ;)
Because it's configurable.
Also available as a plugin for Jetbrains (Android Studio, IntelliJ IDEA, ...)
https://plugins.jetbrains.com/plugin/21003-dartformat
Also available as an extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=eggnstone.DartFormat
- Follow the instructions at https://pub.dev/packages/dart_format/install
Usage: dart_format [args]
<dart file> [<dart file> ...] Formats the specified dart file(s)
--config=<config JSON> Specifies the configuration
--dry-run, -dr Writes output to "<original filename>.formatted.dart"
--errors-as-json Writes errors as JSON to stderr
--log-to-console Logs to console
--pipe Formats stdin and writes to stdout
--skip-version-check Skips version check on start-up
--web[service] Starts in web service mode