previous method
Jump this demo flow to previous step if not at the first step.
Implementation
Future<void> previous() async {
assert(_debugAssertNotDisposed());
assert(_debugAssertOpened());
if (isFirstStep) return;
if (await onWillPrevious?.call(currentStep) ?? true) {
await _switchStep(_currentStep, _currentStep - 1);
}
}