next method

Future<void> next()

Advance to the next question, or complete on the last.

Implementation

Future<void> next() async {
  if (!canAdvance || _submitting) return;
  if (isLast) {
    await complete();
  } else {
    _step++;
    notifyListeners();
  }
}