DartFormatter class

Dart source code formatter.

Constructors

DartFormatter({String lineEnding, int pageWidth, int indent, Iterable<StyleFix> fixes})
Creates a new formatter for Dart code. [...]

Properties

fixes Set<StyleFix>
final
hashCode int
The hash code for this object. [...]
read-only, inherited
indent int
The number of characters of indentation to prefix the output lines with.
final
lineEnding String
The string that newlines should use. [...]
read / write
pageWidth int
The number of characters allowed in a single line.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

format(String source, {dynamic uri}) String
Formats the given source string containing an entire Dart compilation unit. [...]
formatSource(SourceCode source) SourceCode
Formats the given source. [...]
formatStatement(String source) String
Formats the given source string containing a single Dart statement.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited