FormEntryModel constructor

FormEntryModel(
  1. FormDef form, {
  2. RepeatStructure repeatStructure = RepeatStructure.linear,
})

A model for form starting before the first element. Non-linear repeats fall back to linear when the form has jr:count repeats.

Implementation

FormEntryModel(
  this.form, {
  RepeatStructure repeatStructure = RepeatStructure.linear,
}) : repeatStructure =
         repeatStructure == RepeatStructure.nonLinear &&
             _containsRepeatGuesses(form)
         ? RepeatStructure.linear
         : repeatStructure,
     _currentFormIndex = FormIndex.beginningOfForm();