work static method
Executes the given action only if a job with the same jobName hasn't been executed before.
Parameters:
jobName: Unique identifier for the jobaction: Callback to execute if this is the first time this job is run
If a job with the same name has already been executed, this method does nothing.
Implementation
static void work({required String jobName, required VoidCallback action}) {
if (_done.contains(jobName)) {
return;
}
_done.add(jobName);
action();
}