LiveLineEditor class
Reads lines for the metro live shell, with editing, history and Tab
completion.
When input isn't an interactive terminal, such as a script piped into
metro live, lines are read as they are, without editing.
Constructors
-
LiveLineEditor({required Stream<
List< input, required StringSink output, LiveTerminal terminal = const StdioLiveTerminal(), List<int> >String> history = const [], int historyLimit = 500, LiveCompleter? complete}) -
Creates a LiveLineEditor that reads bytes from
inputand writes tooutput.
Properties
Methods
-
cancelLine(
) → void - Discards the line being typed and shows a fresh prompt.
-
close(
) → Future< void> - Puts the terminal back the way it was and stops reading input.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
printAbove(
String text) → void -
Prints
textabove the prompt, keeping what's been typed so far. -
readLine(
String prompt) → Future< String?> -
Prints
promptand reads one line. -
toString(
) → String -
A string representation of this object.
inherited
-
updatePrompt(
String prompt) → void - Replaces the prompt, redrawing the line being typed.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited