resize method

void resize({
  1. required int rows,
  2. required int cols,
})

Implementation

void resize({required int rows, required int cols}) {
  final pty = _pty;
  _rows = rows;
  _cols = cols;
  if (_state != GhosttyTerminalPtySessionState.running || pty == null) {
    return;
  }
  try {
    pty.resize(rows: rows, cols: cols);
  } catch (error, stackTrace) {
    _events.add(GhosttyTerminalPtyErrorEvent(error, stackTrace));
  }
}