registerAggregatePrecondition method Null safety

Precondition registerAggregatePrecondition(
  1. PreconditionId id,
  2. Iterable<PreconditionId> dependsOn,
  3. {dynamic resolveTimeout = const Duration(seconds: 10),
  4. dynamic satisfiedCache =,
  5. dynamic notSatisfiedCache =,
  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.


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