resize method
Resizes the buffer to newWidth by newHeight terminal cells.
Implementation
void resize(int newWidth, int newHeight) {
_checkValid();
// Validate dimensions - match Go's validation pattern
if (newWidth <= 0 || newHeight <= 0) {
throw ArgumentError(
'Invalid dimensions: width and height must be greater than 0',
);
}
_bindings.bufferResize(_ptr, newWidth, newHeight);
}