initializeState method

void initializeState({
  1. List<T>? tutorialIds,
})

Initializes the state for specified or all tutorials.

Sets the step index to -1 (not started) for each tutorial ID.

Parameters:

  • tutorialIds: Optional list of tutorial IDs to initialize. If null, initializes all tutorials in _tutorials.

Implementation

void initializeState({List<T>? tutorialIds}) {
  final idsToInitialize = tutorialIds ?? _tutorials.keys.toList();
  for (final id in idsToInitialize) {
    _currentSteps[id] = -1;
  }
  notifyListeners();
}