Logger class
Properties
- cursorPosition ↔ Coordinate?
-
Returns the current cursor position as a coordinate.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasTerminal → bool
-
Whether there is a terminal attached to stdout.
no setterinherited
- newLine → String
-
Returns the current newline string.
no setterinherited
- rawMode ↔ bool
-
Returns whether the terminal is in raw mode.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supportsEmoji → bool
-
Returns whether the terminal supports Unicode emojis (👍)
no setterinherited
- windowHeight → int
-
Returns the height of the current console window in characters.
no setterinherited
- windowWidth → int
-
Returns the width of the current console window in characters.
no setterinherited
Methods
-
clearScreen(
) → void -
Clears the entire screen
inherited
-
cursorDown(
) → void -
Moves the cursor one position down.
inherited
-
cursorLeft(
) → void -
Moves the cursor one position to the left.
inherited
-
cursorRight(
) → void -
Moves the cursor one position to the right.
inherited
-
cursorUp(
) → void -
Moves the cursor one position up.
inherited
-
eraseCursorToEnd(
) → void -
Erases the current line from the cursor to the end of the line.
inherited
-
eraseLine(
) → void -
Erases all the characters in the current line.
inherited
-
error(
String message) → void -
executionTime(
int milliseconds) → void -
hideCursor(
) → void -
Hides the cursor.
inherited
-
info(
String message) → void -
message(
String message) → void -
messageWrite(
String message) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readKey(
) → Key -
Reads a single key from the input, including a variety of control
characters.
inherited
-
readLine(
{bool cancelOnBreak = false, bool cancelOnEscape = false, bool cancelOnEOF = false, void callback(String text, Key lastPressed)?}) → String? -
Reads a line of input, handling basic keyboard navigation commands.
inherited
-
resetColorAttributes(
) → void -
Resets all color attributes and text styles to the default terminal
setting.
inherited
-
resetCursorPosition(
) → void -
Moves the cursor to the top left corner of the screen.
inherited
-
setBackgroundColor(
ConsoleColor background) → void -
Sets the console background color to a named ANSI color.
inherited
-
setBackgroundExtendedColor(
int colorValue) → void -
Sets the background to one of 256 extended ANSI colors.
inherited
-
setForegroundColor(
ConsoleColor foreground) → void -
Sets the console foreground color to a named ANSI color.
inherited
-
setForegroundExtendedColor(
int colorValue) → void -
Sets the foreground to one of 256 extended ANSI colors.
inherited
-
setTextStyle(
{bool bold = false, bool faint = false, bool italic = false, bool underscore = false, bool blink = false, bool inverted = false, bool invisible = false, bool strikethru = false}) → void -
Sets the text style.
inherited
-
showCursor(
) → void -
Shows the cursor.
inherited
-
success(
String message) → void -
toString(
) → String -
A string representation of this object.
inherited
-
warning(
String message) → void -
write(
Object text) → void -
Writes the text to the console.
inherited
-
writeAligned(
Object text, [int? width, TextAlignment alignment = TextAlignment.left]) → void -
Writes a quantity of text to the console with padding to the given width.
inherited
-
writeErrorLine(
Object text) → void -
Writes an error message to the console, with newline automatically
appended.
inherited
-
writeLine(
[Object? text, TextAlignment alignment = TextAlignment.left]) → void -
Writes a line to the console, optionally with alignment provided by the
TextAlignment
enumeration.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited