saveIndex method
Records that tour is on step index, or forgets the position when
index is null.
Called on every step change and once more when the tour ends, so a finished tour does not resume in the middle next time. The default does nothing, which is what makes resuming opt-in per storage.
Implementation
@override
Future<void> saveIndex(String tour, int? index) async {
calls.add('saveIndex:$tour:$index');
if (index == null) {
indices.remove(tour);
} else {
indices[tour] = index;
}
}