goTo method
Jump to a specific step (0-based).
Out-of-range: assert in debug (a loud tour-authoring error), no-op in release. In idle (no active tour) — a no-op.
Implementation
void goTo(int index) {
final steps = _machine.state.tour?.steps;
if (steps == null) return; // no active tour
assert(
index >= 0 && index < steps.length,
"hintful: goTo($index) out of range 0..${steps.length - 1}",
);
_dispatch(UserGoTo(index: index));
}