OutputBuffer class
Manages a grid of character cells and renders diffs to the terminal.
- Implementers
Constructors
- OutputBuffer(Terminal terminal)
-
Creates an OutputBuffer for the given
terminaland initializes the grid.
Properties
Methods
-
clear(
) → void - Fills the entire grid with empty cells.
-
clearAll(
) → void - Clears both the grid and the terminal, forcing a full redraw on next flush.
-
conditionalClear(
) → void - Clears using a full clear only when remnants are likely, otherwise uses a smart clear.
-
flush(
) → void - Renders only the changed cells to the terminal since the last flush.
-
needsFullClear(
) → bool -
Returns
trueif the previous frame had significantly more content than the current one. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resize(
) → void - Rebuilds the internal grid to match the current terminal dimensions.
-
smartClear(
) → void - Fills the grid with empty cells while preserving the previous frame for diffing.
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
int x, int y, String char) → void - Writes a character at the given position with default styling.
-
writeStyled(
int x, int y, String char, TextStyle? style) → void -
Writes a character at the given position with the specified
style.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited