WindowsConsole class abstract final

Windows console-mode helpers used to put the console into a raw, virtual-terminal mode.

On Windows the Dart stdin byte stream is read with ReadFile, which does not report arrow keys, Escape and other special keys unless the console input buffer has ENABLE_VIRTUAL_TERMINAL_INPUT set. Setting stdin.lineMode and stdin.echoMode (as done on Unix) is not enough, so this helper enables virtual-terminal input via the Win32 API. Without it the inline TUI never receives those keys.

All methods are no-ops on non-Windows platforms.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

enableRawVirtualTerminal() WindowsConsoleModes?
Switches the console into raw, virtual-terminal input mode and ensures the output supports virtual-terminal processing.
restore(WindowsConsoleModes modes) → void
Restores the console modes captured by enableRawVirtualTerminal.