OneTimeWorker class
Utility class that ensures a job is executed only once per unique job name.
This class maintains a set of completed job names and prevents the same job from being executed multiple times.
Constructors
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
-
work(
{required String jobName, required VoidCallback action}) → void -
Executes the given
actiononly if a job with the samejobNamehasn't been executed before.