writeln method
Writes the string representation of object
followed by a newline.
Equivalent to buffer.write(object)
followed by buffer.write("\n")
.
The newline is always represented as "\n"
, and does not use a platform
specific line ending, e.g., "\r\n"
on Windows.
Notice that calling buffer.writeln(null)
will write the "null"
string
before the newline. Omitting the argument, or explicitly passing an empty
string, is the recommended way to emit just the newline.
Implementation
@override
void writeln([Object? obj = '']) {
_buffer = null;
super.writeln(obj);
}