BodyConvertible<Success, Failure extends Error> mixin
A mixin that adds functionality to convert form state into a map of key-value pairs suitable for creating a request body.
- Superclass constraints
- FormController<
Success, Error>
- FormController<
- Available extensions
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
↔ BondFormState<
Success, Error> -
Returns the current state of the form.
getter/setter pairinherited
- stopOnFirstError ↔ bool
-
A flag indicating if the validation should stop on encountering the first error.
getter/setter pairinherited
Methods
-
body(
) → Map< String, dynamic> -
Generates a map from the form state, applying any transformations
specified by the
fieldTransformers
method. -
clear(
) → void -
Clears the form state and resets it to its initial pristine state.
inherited
-
fields(
) → Map< String, FormFieldState> -
Returns the map of field names to their corresponding
FormFieldState
.inherited -
fieldTransformers(
TransformersRegistry registry) → void - Registers transformers for specific field types.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onSubmit(
) → Future< Success> -
To be implemented by the subclass, detailing what should happen when a form is submitted.
inherited
-
setError(
String fieldName, String error) → void -
Sets an error message for the specified field and updates the form state to invalid.
inherited
-
submit(
) → Future< void> -
Initiates the form submission process.
inherited
-
toggleCheckbox<
T> (String fieldName, {required T value, bool? selected}) → void -
Available on FormController<
Toggles the value of a specific checkbox within a checkbox group.dynamic, Error> , provided by the XFormController extension -
toString(
) → String -
A string representation of this object.
inherited
-
update<
T extends FormFieldState< (G> , G>String fieldName, G value) → void -
Updates the field value and status.
inherited
-
updateAsyncDropDown<
T> (String fieldName, T value) → void -
Available on FormController<
Updates a AsyncDropDownFieldState with a givendynamic, Error> , provided by the XFormController extensionvalue
. -
updateCheckbox(
String fieldName, bool value) → void -
Available on FormController<
Updates a CheckboxFieldState with a givendynamic, Error> , provided by the XFormController extensionvalue
. -
updateCheckboxGroup<
T> (String fieldName, Set< T> value) → void -
Available on FormController<
Updates a CheckboxGroupFieldState with a givendynamic, Error> , provided by the XFormController extensionvalue
. -
updateDate(
String fieldName, DateTime? value) → void -
Available on FormController<
Updates a DateFieldState with a givendynamic, Error> , provided by the XFormController extensionvalue
. -
updateDropDown<
T> (String fieldName, T value) → void -
Available on FormController<
Updates a DropDownFieldState with a givendynamic, Error> , provided by the XFormController extensionvalue
. -
updateError(
String fieldName, String error) → void -
Updates the error message for the specified field and performs additional validation.
inherited
-
updateFile(
String fieldName, File? value) → void -
Available on FormController<
Updates a FileFieldState with a givendynamic, Error> , provided by the XFormController extensionvalue
. -
updateHiddenField<
T> (String fieldName, T value) → void -
Available on FormController<
Updates a HiddenFieldState with a givendynamic, Error> , provided by the XFormController extensionvalue
. -
updateRadioButton<
T> (String fieldName, T value) → void -
Available on FormController<
Updates a RadioButtonFieldState with a givendynamic, Error> , provided by the XFormController extensionvalue
. -
updateRadioGroup<
T> (String fieldName, T value) → void -
Available on FormController<
Updates a RadioGroupFieldState with a givendynamic, Error> , provided by the XFormController extensionvalue
. -
updateText(
String fieldName, String? value) → void -
Available on FormController<
Updates a TextFieldState with a givendynamic, Error> , provided by the XFormController extensionvalue
. -
validate(
) → void -
Validates all fields in the form.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited