nextStep method

Future<void> nextStep()

Implementation

Future<void> nextStep() async {
  _options.onNext(
    _currentStep,
    _formPageControllers[_currentStep].getAllValues(),
  );

  _currentStep += 1;

  if (_currentStep >= _options.pages.length && _options.checkPage != null) {
    _checkingPages = true;
  }

  notifyListeners();

  await _pageController.animateToPage(
    _currentStep,
    duration: const Duration(milliseconds: 250),
    curve: Curves.ease,
  );
}