PreconditionFunction typedef Null safety

PreconditionFunction = FutureOr<PreconditionStatus> Function()

Implement your precondition verification in form of this function type. Return either: PreconditionStatus.satisfied() or PreconditionStatus.unsatisfied() as a result of your test.

Implementation

typedef FutureOr<PreconditionStatus> PreconditionFunction();