CHAPTER 8
Cleaning up with Dart Formatter
In this chapter we will show you a new Dart tool available from Dart 1.3 that will let you clean up your Dart code.
We’ll see what this new tool is and how you can use it from the command-line with all its options and from Dart Editor.
Dart Formatter
From Dart 1.3 we have available a new tool with Dart that will let you format properly and automatically your Dart code. This tool is Dart Formatter and you can run it from the Dart sdk bin directory with these two modes.
dart-sdk/bin/dartfmt [flags] FILE.DARTdart-sdk/bin/dartfmt [flags] DIRECTORY
It is simple to use. If you specify a Dart file code, the tool ...
Get Web Programming with Dart now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.