SubmitFormAction class final
Validates a form's answers and stores them in the app's own variables
(service: local). See docs/submit_form.md.
A remote destination is an explicit later action (callApi in
onSuccess) to an endpoint the app defines; this action itself never
calls a service.
- Inheritance
-
- Object
- ActionDef
- DataAction
- SubmitFormAction
Constructors
-
SubmitFormAction({FormService service = FormService.local, String payload = '', String validationScript = '', Map<
String, String> validationArguments = const {}, String responseVariable = '', bool prepend = false, String resultVariable = '', List<ActionDef> onSuccess = const [], List<ActionDef> onError = const [], bool enabled = true, bool nonBlocking = false, Predicate? when}) -
const
Properties
- enabled → bool
-
False skips the action.
finalinherited
- fieldsJson → Json
-
Its own fields, as JSON (sparse): what toJson writes besides
typeand the common fields. An action class outside this library overrides this.no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
-
nested
→ List<
ActionDef> -
The actions it runs itself (branches, follow-ups), in order.
no setteroverride
- nonBlocking → bool
-
The chain doesn't wait for it, and its failure doesn't stop the chain.
finalinherited
-
onError
→ List<
ActionDef> -
final
-
onSuccess
→ List<
ActionDef> -
final
- payload → String
-
An expression yielding a JSON object. An awaited validator may replace
it with its normalized
payload.final - prepend → bool
-
final
- responseVariable → String
-
An expression yielding a JSON object. An awaited validator may replace
it with its normalized
payload.final - resultVariable → String
-
An expression yielding a JSON object. An awaited validator may replace
it with its normalized
payload.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selfAndNested
→ Iterable<
ActionDef> -
This action, then every action nested in it, depth first.
no setterinherited
- service → FormService
-
final
- type → String
-
The JSON
type.no setteroverride -
validationArguments
→ Map<
String, String> -
final
- validationScript → String
-
An expression yielding a JSON object. An awaited validator may replace
it with its normalized
payload.final - when → Predicate?
-
Runs only when it holds; null: always.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Json -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited