FormEntryController class final

Navigates a form and answers its questions.

Port of org.javarosa.form.api.FormEntryController.

Constructors

FormEntryController(FormEntryModel model)
A controller for model.

Properties

hashCode → int
The hash code for this object.
no setterinherited
language ↔ String?
The form's current language.
getter/setter pair
model → FormEntryModel
The form state.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addFilterStrategy(FilterStrategy strategy) → void
Adds a predicate filter strategy to the form.
addFunctionHandler(XPathFunctionHandler handler) → void
Adds a custom XPath function to the form.
addPostProcessor(FormEntryFinalizationProcessor processor) → void
Adds a processor run by finalizeFormEntry.
answerQuestion(AnswerValue? data, {FormIndex? index, bool midSurvey = false}) → AnswerStatus
Answers the question at index (by default the current one) with data if it is non-empty for a required question and satisfies the constraint.
deleteRepeat([FormIndex? index]) → FormIndex
Deletes the repeat instance at index (by default the current one); returns the deleted instance's index.
deleteRepeatAt(int n) → void
Deletes instance n of the current repeat.
descendIntoNewRepeat() → FormIndex
Adds an instance to the current repeat and moves into it.
descendIntoRepeat(int n) → FormIndex
Moves into instance n of the current repeat.
finalizeFormEntry() → void
Finalizes the form (end timestamps, revalidation actions), then runs the finalization processors.
jumpToIndex(FormIndex index) → FormEntryEvent
Moves to index; returns what is there.
jumpToNewRepeatPrompt() → void
Moves forward to the new-repeat prompt of the repeat containing the current index.
newRepeat([FormIndex? index]) → void
Adds the repeat instance at index (by default the current one).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveAnswer(AnswerValue? data, {FormIndex? index, bool midSurvey = false}) → bool
Saves data at index (by default the current question) without checks; whether anything was saved.
stepToNextEvent() → FormEntryEvent
Moves to the next relevant element; returns what is there.
stepToPreviousEvent() → FormEntryEvent
Moves to the previous relevant element; returns what is there.
toString() → String
A string representation of this object.
inherited

Operators

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