WriteStream class abstract
The slice of an output stream a CLI needs: write text, know whether it is attached to a terminal, and move the cursor for in-place updates.
Mirrors Node's
Pick<NodeJS.WriteStream, "write" | "isTTY" | "clearLine" | "cursorTo">.
Named WriteStream rather than Stream so it does not shadow
dart:async's Stream in every consumer.
Implement this to capture output in tests; see StdioWriteStream for the process-stream implementation.
- Implementers
Constructors
Properties
Methods
-
clearLine(
int dir) → void -
Clears part of the current line: to its start when
diris negative, to its end when positive, and the whole line at zero. -
cursorTo(
int column) → void -
Moves the cursor to
column, counted from zero. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
String chunk) → void -
Writes
chunkverbatim. No newline is appended.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited