writeln method

void writeln(
  1. String text
)

Add text with indentation and a newline.

Implementation

void writeln(String text) {
  if (text.isEmpty) {
    _sink.write(newline);
  } else {
    _sink.write(str() + text + newline);
  }
}