shouldRun method

  1. @override
FutureOr<bool> shouldRun(
  1. TaskInvocation invocation
)
override

Check if the provided task invocation should run.

Returns true if it should, false otherwise.

Implementation

@override
FutureOr<bool> shouldRun(TaskInvocation invocation) async {
  for (var cond in conditions) {
    if (!await cond.shouldRun(invocation)) return false;
  }
  return true;
}