ProgressBar class

A single-line, carriage-return progress bar for file transfers.

Renders [######----] 62% 4.1/6.6 MB 1.2 MB/s name in place, throttled to a few updates a second. A no-op when stdout is not a terminal (or NO_COLOR is set), so piped/redirected output stays clean.

Constructors

ProgressBar({IOSink? out, bool? enabled, int width = 24})
Creates a progress bar writing to out (defaults to stdout).

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

finish() → void
Finishes the bar with a trailing newline (no-op when disabled).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(TransferProgress p) → void
Renders p, throttled; safe to call on every chunk.

Operators

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