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 when ansi is true (by default, when the terminal supports them and NO_COLOR isn't set).

Properties

ansi → bool
Whether ANSI colors are written.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

block(LiveBlock block, {String? prefix}) → void
Writes a block, prefixing each line with prefix when 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 value as indented JSON.
line(String text, [LiveTone tone = LiveTone.plain]) → void
Writes text as a single line styled with tone.
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