write method

void write(
  1. String text
)

Writes text without a trailing newline (newlines in text are counted).

Implementation

void write(String text) {
  TerminalContext.output.write(text);
  _lineCount += '\n'.allMatches(text).length;
}