registerAggregatePrecondition method Null safety

Precondition registerAggregatePrecondition(
  1. PreconditionId id,
  2. Iterable<PreconditionId> dependsOn,
  3. {dynamic resolveTimeout = const Duration(seconds: 10),
  4. dynamic satisfiedCache = Duration.zero,
  5. dynamic notSatisfiedCache = Duration.zero,
  6. StatusBuilder? statusBuilder}
)

Very similar to registerPrecondition, but the test it itself is always successful and the result of this precondition depends solely on "parent" preconditions defined in dependsOn.

Use this mechanism to organize your preconditions into groups with different priority or purpose.

Implementation

Precondition registerAggregatePrecondition(PreconditionId id, Iterable<PreconditionId> dependsOn,
    {resolveTimeout: const Duration(seconds: 10), satisfiedCache: Duration.zero, notSatisfiedCache: Duration.zero, StatusBuilder? statusBuilder}) {
  return registerPrecondition(id, () => PreconditionStatus.satisfied(),
      description: "combination of other preconditions",
      dependsOn: dependsOn,
      resolveTimeout: resolveTimeout,
      satisfiedCache: satisfiedCache,
      notSatisfiedCache: notSatisfiedCache,
      statusBuilder: statusBuilder);
}