LivePrinter class
Prints live command output to the terminal.
Constructors
- LivePrinter({StringSink? sink, bool? ansi})
-
Creates a LivePrinter writing to
sink(stdout by default), with colors whenansiis true (by default, when the terminal supports them andNO_COLORisn't set).
Properties
Methods
-
block(
LiveBlock block, {String? prefix}) → void -
Writes a
block, prefixing each line withprefixwhen given. -
blocks(
List< ({LiveBlock block, String label})> blocks) → void -
Writes each labelled block, adding
[device]prefixes when there is more than one. -
error(
String text) → void - Writes an error.
-
json(
Object? value) → void -
Writes
valueas indented JSON. -
line(
String text, [LiveTone tone = LiveTone.plain]) → void -
Writes
textas a single line styled withtone. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
note(
String text) → void - Writes secondary information.
-
success(
String text) → void - Writes a completed action.
-
toString(
) → String -
A string representation of this object.
inherited
-
warning(
String text) → void - Writes a warning.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited