clear method

void clear()

Clears the entire canvas buffer, resetting all cells to spaces with no style.

Also sends ANSI escape sequences to clear the terminal screen and reset cursor.

Implementation

void clear() {
  for (var row in _screenBuffer) {
    for (final cell in row) {
      cell.clear();
    }
  }
}