Display class abstract

A display is an optional external "backend" API for use with a screen.

While not necessarily backed by an actual terminal (or terminal emulator), a Display has the minimal amount of APIs needed in order to draw pixels to a terminal-like backend.


Display.fromAnsiTerminal(StringSink output, {required int width(), required int height()})
Creates a display that writes ANSI escape codes to a string buffer.
Display.fromStringBuffer(StringBuffer output, {int width, int height})
Creates a minimal display that writes plain text to a string buffer.


hashCode int
The hash code for this object.
no setterinherited
height int
Returns the height of the output display in characters.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
Returns the width of the output display in characters.
no setter


clearScreen() → void
Clears the entire output display.
flush() → void
Flushes the output buffer, if any.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
resetStyles() → void
Resets all output styling applied.
setBackgroundColor(Color color) → void
Sets subequent text's 24-bit RGB background color.
setForegroundColor(Color color) → void
Sets subequent text's 24-bit RGB foreground color.
toString() String
A string representation of this object.
writeByte(int byte) → void
Writes the provided byte as a character to the terminal output.


operator ==(Object other) bool
The equality operator.