ImageWorkerPool class
Methods
cancel ([Task? task , String ? message ])
→ void
Task cancellation. If a specific task
is provided, only this task will be cancelled.
Otherwise, all tasks registered with the WorkerPool
are cancelled.
inherited
crop (Uint8List imageData , int x , int y , int width , int height )
→ Future <String ? >
override
execute <T > (Future <T > task (ImageWorker worker ), {PerfCounter? counter })
→ Future <T >
Registers and schedules a task
that returns a single value.
Returns a future that completes with the task's value.
inherited
flip (Uint8List imageData , String axis )
→ Future <String ? >
override
gray (Uint8List imageData )
→ Future <String ? >
override
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerWorkerPoolListener (void listener (ImageWorker worker , bool removed ) )
→ Object
Registers a callback to be invoked when a worker thread is added or removed from the pool.
inherited
resize (Uint8List imageData , int width , int height )
→ Future <String ? >
override
scheduleStream <T > (Stream <T > task (ImageWorker worker ), {PerfCounter? counter })
→ StreamTask<T >
Registers and schedules a task
that returns a stream of values.
Returns a StreamTask
inherited
scheduleTask <T > (Future <T > task (ImageWorker worker ), {PerfCounter? counter })
→ ValueTask<T >
Registers and schedules a task
that returns a single value.
Returns a ValueTask
inherited
start ()
→ FutureOr <void >
Ensure at least ConcurrencySettings.minWorkers
workers are started
(defaulting to 1 if ConcurrencySettings.minWorkers
is zero).
inherited
stop ([bool predicate (ImageWorker worker )? ])
→ int
Stop idle pool workers matching the predicate
.
If predicate
is null or not provided, all workers will be stopped.
Stopping a worker does not interrupt or cancel processing. Workers will
complete pending tasks before shutting down. In the meantime, they will
not receive any new workload.
Returns the number of workers that have been stopped.
inherited
stream <T > (Stream <T > task (ImageWorker worker ), {PerfCounter? counter })
→ Stream <T >
Registers and schedules a task
that returns a stream of values.
Returns a stream containing the task's values.
inherited
toString ()
→ String
A string representation of this object.
inherited
unregisterWorkerPoolListener ({dynamic listener (ImageWorker worker , bool removed )?, Object ? token })
→ void
Unregisters a callback.
inherited
flutter_image_transform 1.0.1