progressTutorial method

Future<void> progressTutorial(
  1. dynamic event,
  2. dynamic emit
)

Implementation

Future<void> progressTutorial(var event, var emit) async {
  (TutorialStep?, int?) next = _tutorial.getNextStep(state._currentTutorialIndex);
  TutorialStep? nextStep = next.$1;
  int? nextIndex = next.$2;

  if (nextStep != null) {
    await Future.delayed(Constants.waitBetweenSteps);
    nextStep.execute(this);
    emit(TutorialState.running(nextIndex, nextStep));
  } else {
    emit(const TutorialState.idle());
  }
}