ZenWorkers class

Clean, composable ZenWorkers API with improved type inference and pause/resume support

Constructors

ZenWorkers.new()

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

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

Static Methods

combine(List<ZenWorkerHandle> workers) ZenWorkerHandle
Composable worker for multiple observables
condition<T>(ValueNotifier<T> obs, bool condition(T), void callback(T)) ZenWorkerHandle
debounce<T>(ValueNotifier<T> obs, void callback(T), Duration duration) ZenWorkerHandle
ever<T>(ValueNotifier<T> obs, void callback(T)) ZenWorkerHandle
Convenience methods with improved type inference
group() ZenWorkerGroup
Create a worker group for batch operations
interval<T>(ValueNotifier<T> obs, void callback(T), Duration duration) ZenWorkerHandle
once<T>(ValueNotifier<T> obs, void callback(T)) ZenWorkerHandle
throttle<T>(ValueNotifier<T> obs, void callback(T), Duration duration) ZenWorkerHandle
watch<T>(ValueNotifier<T> observable, void callback(T), {WorkerType type = WorkerType.ever, Duration? duration, bool condition(T)?}) ZenWorkerHandle
Universal worker creation method with explicit generic type preservation