XFormController extension
Extension methods for FormController providing more type-safe updates.
The XFormController extension adds methods to FormController to simplify
updating the values of various form fields in a type-safe manner.
Example usage:
// Update the value of a text field.
controller.updateText('fieldName', 'new value');
// Update the value of a checkbox field.
controller.updateCheckbox('fieldName', true);
// Toggle a value in a checkbox group.
controller.toggleCheckbox('fieldName', value: 'value', selected: true);
Methods:
- updateText Updates a TextFieldState with a given value.
- updateCheckbox Updates a CheckboxFieldState with a given value.
- updateCheckboxGroup Updates a CheckboxGroupFieldState with a given value.
- toggleCheckbox Toggles the value of a specific checkbox within a checkbox group.
- updateDate Updates a DateFieldState with a given value.
- updateDropDown Updates a DropDownFieldState with a given value.
- updateAsyncDropDown Updates a AsyncDropDownFieldState with a given value.
- updateRadioButton Updates a RadioButtonFieldState with a given value.
- updateRadioGroup Updates a RadioGroupFieldState with a given value.
- updateAsyncRadioGroup Updates an AsyncRadioGroupFieldState with a given value.
- updateRadioGroupItems Updates a RadioGroupFieldState with a list of RadioButtonFieldState items.
- updateHiddenField Updates a HiddenFieldState with a given value.
- updateAsyncHiddenField Updates an AsyncHiddenFieldState with a given value.
- updateFile Updates a FileFieldState with a given value.
- on
-
- BaseFormController<
dynamic, Error, BaseBondFormState< dynamic, Error> >
- BaseFormController<
Methods
-
toggleCheckbox<
T> (String fieldName, {required T value, bool? selected}) → void -
Available on BaseFormController<
Toggles the value of a specific checkbox within a checkbox group.dynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> > -
updateAsyncDropDown<
T> (String fieldName, T value) → void -
Available on BaseFormController<
Updates a AsyncDropDownFieldState with a givendynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> >value. -
updateAsyncHiddenField<
T> (String fieldName, T value) → void -
Available on BaseFormController<
Updates a AsyncHiddenFieldState with a given value.dynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> > -
updateAsyncRadioGroup<
T> (String fieldName, T value) → void -
Available on BaseFormController<
Updates an AsyncRadioGroupFieldState with a givendynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> >value. -
updateCheckbox(
String fieldName, bool value) → void -
Available on BaseFormController<
Updates a CheckboxFieldState with a givendynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> >value. -
updateCheckboxGroup<
T> (String fieldName, Set< T> value) → void -
Available on BaseFormController<
Updates a CheckboxGroupFieldState with a givendynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> >value. -
updateDate(
String fieldName, DateTime? value) → void -
Available on BaseFormController<
Updates a DateFieldState with a givendynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> >value. -
updateDropDown<
T> (String fieldName, T value) → void -
Available on BaseFormController<
Updates a DropDownFieldState with a givendynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> >value. -
updateFile(
String fieldName, File? value) → void -
Available on BaseFormController<
Updates a FileFieldState with a givendynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> >value. -
updateHiddenField<
T> (String fieldName, T value) → void -
Available on BaseFormController<
Updates a HiddenFieldState with a givendynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> >value. -
updateRadioButton<
T> (String fieldName, T value) → void -
Available on BaseFormController<
Updates a RadioButtonFieldState with a givendynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> >value. -
updateRadioGroup<
T> (String fieldName, T value) → void -
Available on BaseFormController<
Updates a RadioGroupFieldState with a givendynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> >value. -
updateRadioGroupItems<
T> (String fieldName, List< RadioButtonFieldState< items) → voidT> > -
Available on BaseFormController<
Updates a RadioGroupFieldState with a list of RadioButtonFieldState items.dynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> > -
updateText(
String fieldName, String? value) → void -
Available on BaseFormController<
Updates a TextFieldState with a givendynamic, Error, BaseBondFormState< , provided by the XFormController extensiondynamic, Error> >value.