TaskManager class

Cancellation and inspection of in-flight tasks — reachable as PixelCompressor.tasks. The taskId comes from the onProgress events a compress/compressBatch call reports.

Backed entirely by TaskRegistryDart — Dart originates every task id and holds the pending Future for it, native- or Dart-run alike, so this never needs its own platform channel call; cancel()/cancelAll() forward to native only for the tasks that actually need it.

Constructors

TaskManager.internal()

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

activeTaskIds() Future<List<String>>
Task ids currently running.
cancel(String taskId) Future<bool>
Cancels one task. Returns false if taskId was already finished or unknown. A cancelled task's compress() Future completes with CompressionCancelledException.
cancelAll() Future<void>
Cancels every in-flight task.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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