write method

void write(
  1. dynamic str
)

Use this to write a string, whether in mock mode or with real stdout.

Implementation

void write(str) {
  if (mock) {
    _buffer += str;
    _flush();
  } else {
    stdout.write(str);
  }
}