Renderer class
Manages the terminal rendering pipeline, including frame buffers, compositing, and output flushing.
- Available extensions
Constructors
- Renderer.create(int width, int height, {bool testing = false})
-
Creates a Renderer.
factory
Properties
- autoFlush → bool
-
Gets the current auto-flush setting.
no setter
- debugCurrentBuffer → Buffer
-
Current rendered buffer, exposed for integration tests.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- nextBuffer → Buffer
-
The buffer for the next frame, created lazily and invalidated after each render call.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addToHitGrid(
int x, int y, int width, int height, int id) → void - Registers a low-level native/debug hit-grid region.
-
checkHit(
int x, int y) → int - Queries the low-level native/debug hit grid.
-
clearTerminal(
) → void - Clears the terminal screen.
-
detectCapabilities(
) → TerminalCapabilities -
Available on Renderer, provided by the CapabilitiesDetection extension
Detects and returns the terminal capabilities for the current environment. -
disableKittyKeyboard(
) → void -
Available on Renderer, provided by the KeyboardSupport extension
Disables the Kitty keyboard protocol and reverts to standard terminal key reporting. -
disableMouse(
) → void -
Available on Renderer, provided by the MouseSupport extension
Disables mouse reporting. -
dispose(
{bool useAlternateScreen = false, int splitHeight = 0}) → void - Releases all native renderer resources and detaches the finalizer.
-
enableKittyKeyboard(
{int flags = KittyFlags.disambiguateEscapeCodes}) → void -
Available on Renderer, provided by the KeyboardSupport extension
Enables the Kitty keyboard protocol with the givenflags. -
enableMouse(
{bool enableMovement = false}) → void -
Available on Renderer, provided by the MouseSupport extension
Enables mouse reporting; passenableMovementto also track pointer moves. -
hideCursor(
) → void -
Available on Renderer, provided by the CursorManagement extension
Hides the cursor by setting it invisible at position (0, 0). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
{bool force = false, bool? autoFlush}) → void - Renders the current buffer to the terminal.
-
resize(
int width, int height) → void -
Resize the renderer (and its underlying buffer) to new dimensions.
Invalidates any cached
nextBufferreference. -
setAutoFlush(
bool enabled) → void - Sets the default auto-flush behavior for this renderer.
-
setBackgroundColor(
Color color) → void -
Sets the terminal background color to
color. -
setCursorColor(
Color color) → void -
Available on Renderer, provided by the CursorManagement extension
Sets the terminal cursor color. -
setCursorPosition(
int x, int y, {bool visible = true}) → void -
Available on Renderer, provided by the CursorManagement extension
Set cursor position and visibility. -
setCursorStyle(
CursorStyle style, {bool blinking = false}) → void -
Available on Renderer, provided by the CursorManagement extension
Sets the cursorstyleand whether it blinks. -
setupTerminal(
{bool useAlternateScreen = true}) → void - Initialize terminal session (enter alt screen, set modes)
-
showCursor(
int x, int y) → void -
Available on Renderer, provided by the CursorManagement extension
Shows the cursor at the given (x, y) position. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited