resize method
Resize the pseudo-terminal.
Implementation
void resize(
int rows,
int cols, {
int pixelWidth = 0,
int pixelHeight = 0,
}) {
if (_isDestroyed) return;
validatePtySize(
rows: rows,
columns: cols,
pixelWidth: pixelWidth,
pixelHeight: pixelHeight,
);
final result = _bindings.pty_resize(
_handle,
rows,
cols,
pixelWidth,
pixelHeight,
);
if (result != 0) {
final error = _getPtyError() ?? 'Unknown native error';
throw StateError('Failed to resize PTY: $error');
}
}