performConditionCheck method

  1. @override
Future<bool> performConditionCheck()
override

Performs the condition check for this waiting step.

Loads and executes a condition function from the repository.

Implementation

@override
Future<bool> performConditionCheck() async {
  Future<bool> Function(Duration)? conditionFunction = loadFromRepository?.call();
  if (conditionFunction != null && await conditionFunction(timeout)) {
    return true;
  }
  return false;
}