onResume method
Called by resume. Returns true if successfully resumed.
If false, the executor moves to ExecutorState.PausedButShouldBeResumed.
Implementation
@override
Future<bool> onResume() async {
void check() {
if (configuration!.triggerCondition != null && configuration!.triggerCondition!()) {
onTrigger();
}
}
// check the condition immediately on resume, then once per period.
check();
timer = Timer.periodic(configuration!.period, (_) => check());
return true;
}