resize method
Rebuilds the widget tree with a new simulated terminal size.
Equivalent to the terminal window being resized.
Implementation
void resize(int width, int height) {
screenWidth = width;
screenHeight = height;
_terminal!.terminalWidth = width;
_terminal!.terminalHeight = height;
_program!.send(WindowSizeMsg(width, height));
_syncView();
_pumpCount++;
}