IndentingWriter class

A buffer for writing indented source code.

Constructors

IndentingWriter({String? filename})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceLocationInfo → GeneratedCodeInfo
final

Methods

addAnnotatedBlock(String start, String end, List<NamedLocation> namedLocations, void body(), {bool endWithNewline = true}) → void
addBlock(String start, String end, void body(), {bool endWithNewline = true}) → void
Prints a block of text with the body indented one more level.
addSuffix(String suffixKey, String text) → void
Add a named piece of text that will be emitted at the end of the file after the main contents are generated.
addUnindentedBlock(String start, String end, void body(), {bool endWithNewline = true}) → void
Prints a block of text with an unindented body. (For example, for triple quotes.)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
print(String text) → void
Appends a string indented to the current level. (Indentation will be added after newline characters where needed.)
printAnnotated(String text, List<NamedLocation> namedLocations) → void
println([String text = '']) → void
Same as print, but with a newline at the end.
printlnAnnotated(String text, List<NamedLocation> namedLocations) → void
toString() String
A string representation of this object.
override

Operators

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