saveAnswer method
Saves data at index (by default the current question) without
checks; whether anything was saved.
Implementation
bool saveAnswer(
AnswerValue? data, {
FormIndex? index,
bool midSurvey = false,
}) {
index ??= model.formIndex;
if (model.event(index) != FormEntryEvent.question) {
throw StateError('Non-Question object at the form index.');
}
return _commitAnswer(
model.treeElement(index)!,
index,
data,
midSurvey: midSurvey,
);
}