SpinnerLogWriter class abstract

A LogWriter base class that manages braille progress spinners.

When stdout is a terminal, openScope/closeScope animate a spinner on the last line. Log messages print above the spinner, which redraws after each line.

Subclasses override writeLogLine to format log output and formatSpinner/formatScopeComplete to customize spinner appearance.

Inheritance
Implementers

Constructors

SpinnerLogWriter()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopeStack List<ActiveScope>
Stack of currently-open scopes, innermost last. The innermost entry drives the active spinner line.
final

Methods

close() Future<void>
Releases any resources held by the writer.
inherited
closeScope(LogScope scope, {required bool success, required Duration duration, Object? error, StackTrace? stackTrace}) Future<void>
Ends a scoped operation.
override
formatScopeComplete(LogScope scope, bool success, Duration duration) String
Format the scope completion line. Default uses ✓/✗ with the label and elapsed time.
formatScopeEnd(LogScope scope, bool success, Duration duration) String
Format the scope completion for non-interactive output.
formatScopeStart(LogScope scope) String
Format the scope label for non-interactive (pipe) output.
formatSpinner(String frame, ActiveScope active) String
Format the spinner text for the currently active scope. Default uses green braille frames with gray elapsed time.
log(LogEntry entry) Future<void>
Writes a single log entry.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openScope(LogScope scope) Future<void>
Begins a scoped operation.
override
toString() String
A string representation of this object.
inherited
writeLogLine(LogEntry entry) → void
Write a single log entry to the terminal. Called after the spinner line has been cleared and before it is redrawn.

Operators

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