WarmupProgress class

A single progress snapshot emitted during backend warmup.

Stream contract

  • Events are emitted as work progresses.
  • The stream completes (via onDone) when all warmup tasks finish.
  • Failures are surfaced as events with isDone = true and a non-null error — the stream never errors, so callers don't need onError.

Typical usage (Flutter)

MiniAVTools.warmup().listen(
  (p) {
    if (p.fraction != null) {
      setState(() => _download = p.fraction!);
    }
  },
  onDone: () => setState(() => _ready = true),
);

Constructors

WarmupProgress({required String backendName, required String task, required bool isDone, int? bytesReceived, int? totalBytes, Object? error})
const

Properties

backendName → String
Name of the backend emitting this event (e.g. "ffmpeg").
final
bytesReceived → int?
Bytes received so far (only present for download-type tasks).
final
error → Object?
Set when task completed with an error. isDone is always true when this is non-null.
final
fraction → double?
Download progress in [0.0, 1.0], or null when:
no setter
hashCode → int
The hash code for this object.
no setterinherited
isDone → bool
Whether this event marks the end of task.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
task → String
Human-readable description of the current task (e.g. "Downloading FFmpeg").
final
totalBytes → int?
Total expected bytes. null means the total is unknown (e.g. the server did not send Content-Length).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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