evaluateNextStep method
Step?
evaluateNextStep(
- Step? step,
- ConditionalNavigationRule rule,
- List<
StepResult> previousResults, - StepResult? questionResult,
Implementation
Step? evaluateNextStep(
Step? step,
ConditionalNavigationRule rule,
List<StepResult> previousResults,
StepResult? questionResult,
) {
final nextStepIdentifier =
rule.resultToStepIdentifierMapper(previousResults, questionResult);
if (nextStepIdentifier == null) {
return nextInList(step);
}
return task.steps.firstWhere((element) => element.id == nextStepIdentifier);
}