setCurrentStepFromApi method

void setCurrentStepFromApi(
  1. String? stepFromApi
)

Implementation

void setCurrentStepFromApi(String? stepFromApi) {
  _currentStepIndex = 0;
  try {
    int foundIndex = steps.indexWhere((e) => e.stepKey == stepFromApi);
    if (foundIndex == -1) {
      return;
    }
    _currentStepIndex = foundIndex;
  } catch (e, s) {
    debugPrint('❌ Impossible to find the saved quiz step: $e \n trace: $s');
  }
}