disableGoNext method

  1. @override
Future<void> disableGoNext(
  1. int index, {
  2. Duration duration = const Duration(milliseconds: 150),
  3. Curve curve = Curves.easeIn,
})
override

Disable the next button for specified index. When disabling an index that is lower then the current index the Wizard will automatically animate back to the provided index.

Implementation

@override
Future<void> disableGoNext(
  int index, {
  Duration duration = const Duration(milliseconds: 150),
  Curve curve = Curves.easeIn,
}) async {
  _getStepController(index).disableGoNext();

  final currentIndex = this.index;
  if (index > currentIndex) {
    return;
  }

  await animateTo(
    index: index,
    duration: duration,
    curve: curve,
  );
}