Terminal class

The terminal Lea Code runs in: raw keyboard input, the screen size, and output.

Input goes to the most recently added KeyHandler. Ctrl-C arrives as a Key.ctrlC event whether the terminal sends the byte or a SIGINT.

Constructors

Terminal()

Properties

columns → int
no setter
hashCode → int
The hash code for this object.
no setterinherited
interactive → bool
Whether both input and output are a terminal. When false (piped input or output), Lea reads plain lines and draws nothing that moves.
final
rows → int
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → Future<void>
Restores the terminal and stops reading input.
listen(KeyHandler handler) → void Function()
Sends keys to handler until the returned function is called.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readLine() → Future<String?>
The next input line when the terminal is not interactive, or null at the end of input.
start() → void
toString() → String
A string representation of this object.
inherited
write(String text) → void

Operators

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