nextStep method
void
nextStep(
- T tutorialId, {
- String? route,
- bool backToPreviousPage = false,
- BuildContext? context,
Advances to the next step in the tutorial.
If route
is provided, navigates to that route.
If backToPreviousPage
is true, pops the current page.
Implementation
void nextStep(
T tutorialId, {
String? route,
bool backToPreviousPage = false,
BuildContext? context,
}) {
if (!_tutorials.containsKey(tutorialId)) {
throw Exception('Tutorial ID "$tutorialId" not found');
}
_state.nextStep(tutorialId);
if (route != null && context != null) {
Navigator.pushNamed(context, route);
} else if (backToPreviousPage && context != null) {
Navigator.pop(context);
}
}