Worker<T> class
Worker are callback that do when the Store state has met the specified condition
Advantanges of workers over just listening the store for changes is that it gives you a limit
that specifies
the number of times it needs to be called and after that it automatically get's removed
Also Worker provides a little nicer syntax, it's totally depedening upon the use case whether you want to use a worker or just listen to stream.
Properties
- callback → void Function()
-
The task that needs to performed when the condition is met
final
- called ↔ int
-
getter/setter pair
- condition → bool Function(T data)
-
When to execute the worker, currently it only checks condition for new values, the current value will be skipped.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- limit → int?
-
Number of times it needs to be called
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
execute(
T data) → void -
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