ValueBondFormState extension
Extension methods for BondFormState providing convenience operations.
The ValueBondFormState
extension adds methods to BondFormState
to simplify
retrieving values from form fields. It also includes a method to ensure
required field values are not null.
Example usage:
// Retrieve a potentially null value from a text field.
final phoneNumber = state.textFieldValue('phoneNumber');
// Retrieve a non-null value from a required text field.
final requiredPhoneNumber = state.required().textFieldValue('phoneNumber');
Methods:
- textFieldValue Retrieves the value of a text field.
- radioGroupValue Retrieves the value of a radio group field.
- checkboxSelected Checks if a specific value is selected within a checkbox group.
- checkboxValues Retrieves the selected values of a checkbox group.
- checkboxValue Retrieves the value of a checkbox field.
- checkboxGroupValue Retrieves the first selected value of a checkbox group.
- dateFieldValue Retrieves the value of a date field.
- dropDownValue Retrieves the value of a dropdown field.
- asyncDropDownValue Retrieves the value of an async dropdown field.
- hiddenFieldValue Retrieves the value of a hidden field.
- fileFieldValue Retrieves the value of a file field.
- required Retrieves the
RequiredValues
extension for the current form state.
- on
-
- BondFormState<
dynamic, Error>
- BondFormState<
Methods
-
asyncDropDownValue<
T> (String fieldName) → T -
Available on BondFormState<
Retrieves the selected value of the async dropdown field for a specifieddynamic, Error> , provided by the ValueBondFormState extensionfieldName
. -
checkboxGroupValue<
T> (String fieldName) → T? -
Available on BondFormState<
Retrieves the first selected value of a checkbox group for a specifieddynamic, Error> , provided by the ValueBondFormState extensionfieldName
. -
checkboxSelected<
T> (String fieldName, T value) → bool -
Available on BondFormState<
Checks if a specific value is selected within a checkbox group.dynamic, Error> , provided by the ValueBondFormState extension -
checkboxValue<
T> (String fieldName) → bool -
Available on BondFormState<
Retrieves the value of a checkbox field for a specifieddynamic, Error> , provided by the ValueBondFormState extensionfieldName
. -
checkboxValues<
T> (String fieldName) → Set< T> -
Available on BondFormState<
Retrieves the selected values of a checkbox group for a specifieddynamic, Error> , provided by the ValueBondFormState extensionfieldName
. -
dateFieldValue(
String fieldName) → DateTime? -
Available on BondFormState<
Retrieves the value of a date field for a specifieddynamic, Error> , provided by the ValueBondFormState extensionfieldName
. -
dropDownValue<
T> (String fieldName) → T -
Available on BondFormState<
Retrieves the selected value of the dropdown field for a specifieddynamic, Error> , provided by the ValueBondFormState extensionfieldName
. -
fileFieldValue(
String fieldName) → File? -
Available on BondFormState<
Retrieves the value of a file field for a specifieddynamic, Error> , provided by the ValueBondFormState extensionfieldName
. -
Available on BondFormState<
Retrieves the value of a hidden field for a specifieddynamic, Error> , provided by the ValueBondFormState extensionfieldName
. -
radioGroupValue<
T> (String fieldName) → T -
Available on BondFormState<
Retrieves the value of adynamic, Error> , provided by the ValueBondFormState extensionRadioGroupFieldState
for a specifiedfieldName
. -
required(
) → RequiredValues -
Available on BondFormState<
Retrieves thedynamic, Error> , provided by the ValueBondFormState extensionRequiredValues
extension for the current form state. -
textFieldValue(
String fieldName) → String? -
Available on BondFormState<
Retrieves the value of a text field for a specifieddynamic, Error> , provided by the ValueBondFormState extensionfieldName
.