O'Reilly logo

Web Programming with Dart by Patricia Juberias, Moises Belchin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 8

image

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required