FormEntryModel class final

The state of filling a form: the current index and what is at an index (event, prompts, relevance, read-only), plus index arithmetic.

Port of org.javarosa.form.api.FormEntryModel.

Constructors

FormEntryModel(FormDef form, {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.

Properties

completedRelevantQuestionCount → int
Always 0, as in JavaRosa.
no setter
extras → Map<Object, Object?>
App-defined extra state. Port of getExtras().
final
form → FormDef
The form being filled.
final
formIndex → FormIndex
The current index.
no setter
formTitle → String?
The form title.
no setter
hashCode → int
The hash code for this object.
no setterinherited
language ↔ String?
The current language.
getter/setter pair
languages → List<String>?
The form's languages, or null without translations.
no setter
numQuestions → int
The number of elements in the form (deep count).
no setter
repeatStructure → RepeatStructure
How repeats are navigated.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
totalRelevantQuestionCount → int
Always 0, as in JavaRosa.
no setter

Methods

captionHierarchy([FormIndex? index]) → List<FormEntryCaption>
Captions of the groups and the question along index (by default the current index), outermost first.
captionPrompt([FormIndex? index]) → FormEntryCaption
The caption of the element at index (by default the current one).
compoundIndices([FormIndex? container]) → List<FormIndex>
The relevant indices inside container (by default the current index).
decrementIndex(FormIndex index) → FormIndex
The index before index.
event([FormIndex? index]) → FormEntryEvent
What is at index (by default the current index).
incrementIndex(FormIndex index, {bool descend = true}) → FormIndex
The index after index (into children unless not descend).
isIndexCompoundContainer([FormIndex? index]) → bool
Whether the element at index (by default the current one) is a group with appearance="full".
isIndexCompoundElement([FormIndex? index]) → bool
Whether the question at index (by default the current one) is inside a compound container.
isIndexReadonly([FormIndex? index]) → bool
Whether the element at index (by default the current one) is read-only; the beginning and end of the form are.
isIndexRelevant([FormIndex? index]) → bool
Whether the element at index (by default the current one) is relevant; a new-repeat prompt is when another instance may be added.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
questionPrompt([FormIndex? index]) → FormEntryPrompt
The prompt of the question at index (by default the current one).
setQuestionIndex(FormIndex index) → void
Moves to index, creating jr:count repeat instances on the way.
toString() → String
A string representation of this object.
inherited
treeElement(FormIndex index) → TreeElement?
The instance node at index.

Operators

operator ==(Object other) → bool
The equality operator.
inherited