questionPrompt method

FormEntryPrompt questionPrompt([
  1. FormIndex? index
])

The prompt of the question at index (by default the current one).

Implementation

FormEntryPrompt questionPrompt([FormIndex? index]) {
  index ??= _currentFormIndex;
  if (form.elementAt(index) is! QuestionDef) {
    throw StateError(
      'Invalid query for Question prompt. Non-Question object at the form '
      'index',
    );
  }
  return FormEntryPrompt(form, index);
}