SneathConsoleImpl class

Implemented types

Constructors

SneathConsoleImpl.new({required SneathTerminal terminal})
SneathConsoleImpl.scrolling({required SneathTerminal terminal, bool record_blanks = true})
Create a named constructor specifically for scrolling consoles Use Console.scrolling(recordBlanks: false) to omit blank lines from console history

Properties

cursor_position SneathCursorPositionDelegate
Provides ways to retrieve and update the cursor position.
latefinal
dimensions SneathConsoleDimensions
Contains information about the width and height of the window.
latefinal
hashCode int
The hash code for this object.
no setterinherited
new_line String
Returns the current newline string.
no setteroverride
raw_mode bool
Returns whether the terminal is in raw mode.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
terminal SneathTerminal
final

Methods

clear_screen() → void
Clears the entire screen
override
cursor_down() → void
Moves the cursor one position down.
override
cursor_left() → void
Moves the cursor one position to the left.
override
cursor_right() → void
Moves the cursor one position to the right.
override
cursor_up() → void
Moves the cursor one position up.
override
erase_cursor_to_end() → void
Erases the current line from the cursor to the end of the line.
override
erase_line() → void
Erases all the characters in the current line.
override
hide_cursor() → void
Hides the cursor.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read_key() Key
Reads a single key from the input, including a variety of control characters.
override
read_line({bool cancel_on_break = false, bool cancel_on_escape = false, bool cancel_on_eof = false, void callback(String text, Key lastPressed)?}) String?
Reads a line of input, handling basic keyboard navigation commands.
override
reset_color_attributes() → void
Resets all color attributes and text styles to the default terminal setting.
override
reset_cursor_position() → void
Moves the cursor to the top left corner of the screen.
override
set_background_color(AnsiBackgroundColor background) → void
Sets the console background color to a named ANSI color.
override
set_background_extended_color(AnsiExtendedColorPalette color) → void
Sets the background to one of 256 extended ANSI colors.
override
set_foreground_color(AnsiForegroundColor foreground) → void
Sets the console foreground color to a named ANSI color.
override
set_foreground_extended_color(AnsiExtendedColorPalette color) → void
Sets the foreground to one of 256 extended ANSI colors.
override
set_raw_mode(bool value) → void
Enables or disables raw mode.
override
set_text_style({bool bold = false, bool underscore = false, bool blink = false, bool inverted = false}) → void
Sets the text style.
override
show_cursor() → void
Shows the cursor.
override
toString() String
A string representation of this object.
inherited
write(String text) → void
Writes the text to the console.
override
write_error_line(String text) → void
Writes an error message to the console, with newline automatically appended.
override
write_line([String? text, ConsoleTextAlignment alignment = ConsoleTextAlignments.left]) → void
Writes a line to the console, optionally with alignment provided by the ConsoleTextAlignment enumeration.
override
write_line_centered(String? text) → void
override
write_lines(Iterable<String> lines, ConsoleTextAlignment alignment) → void
override
write_lines_centered(Iterable<String> lines) → void
override

Operators

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