resize method
Resizes the terminal, where the backend supports it (no-op otherwise).
Implementation
@override
void resize({required int cols, required int rows}) {
if (_disposed) return;
try {
_winpty.setSize(_wp, cols, rows, nullptr);
} catch (_) {
// Best-effort: the agent may already be gone.
}
}