clear method
Clears the rendered content.
Implementation
@override
void clear() {
_initialize();
if (!_options.isInline) {
terminal.write(uv_graphics.deleteAllRetainedGraphics());
}
_lastGraphicsFrame = uv_graphics.TerminalGraphicsFrame.empty;
_renderer?.erase();
// Discard any ESC[2J queued by erase() into the inline capture buffer.
if (_options.isInline) _inlineCapture.clear();
_dirty = true;
_invalidateNativeFrameCache(resetPrevious: true);
// Stop the stopwatch to force next render to proceed
_frameStopwatch.stop();
_pendingView = '';
unawaited(terminal.flush());
}