resize method

void resize()

Rebuilds the internal grid to match the current terminal dimensions.

Implementation

void resize() {
  _grid = List.generate(
    terminal.height,
    (_) => List.generate(terminal.width, (_) => Cell.empty),
  );
  _previousGrid = List.generate(
    terminal.height,
    (_) => List.generate(terminal.width, (_) => Cell.empty),
  );
}