TutorialRunner constructor
TutorialRunner(
- Tutorial tutorialContainer,
- TutorialRepository tutorialRepository
Implementation
factory TutorialRunner(Tutorial tutorialContainer, TutorialRepository tutorialRepository) {
List<TutorialStep> tutorialSteps = tutorialContainer.tutorialSteps;
List<TutorialStep> tutorialStepsWithLoadingFunction = [];
for (TutorialStep tutorialStep in tutorialSteps) {
if (tutorialStep is TutorialStepWithID) {
tutorialStepsWithLoadingFunction.add(tutorialStep.setLoadingFunction(tutorialRepository: tutorialRepository));
continue;
}
tutorialStepsWithLoadingFunction.add(tutorialStep);
}
return TutorialRunner._internal(tutorialStepsWithLoadingFunction);
}