RadioGroupFieldState<T> class
Represents the state of a group of radio buttons form fields.
A radio button group form field extends the FormFieldState class, providing a way to manage the state of multiple radio buttons within a group.
- Inheritance
-
- Object
- FormFieldState<
T> - RadioGroupFieldState
Constructors
-
RadioGroupFieldState(List<
RadioButtonFieldState< radioButtons, {required String label, required T value, String? error, List<T> >ValidationRule< rules = const []})T> > - Creates a new instance of RadioGroupFieldState.
Properties
- error → String?
-
The error message associated with the form field, if any.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- label → String
-
The label or name of the form field.
finalinherited
-
radioButtons
→ List<
RadioButtonFieldState< T> > -
The list of individual radio button field states within the group.
final
-
rules
→ List<
ValidationRule< T> > -
The list of validation rules to apply to the form field.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- touched → bool
-
Indicates whether the form field has been touched (interacted with) by the user.
finalinherited
- validateOnUpdate → bool
-
Indicates whether validation should occur when the form field is updated.
finalinherited
- value → T
-
The current value of the form field.
finalinherited
Methods
-
copyWith(
{T? value, String? error, String? label, bool? touched, bool? validateOnUpdate, List< ValidationRule< ? rules}) → RadioGroupFieldState<T> >T> -
Creates a new FormFieldState object by copying the existing state
and replacing the specified fields with new values.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateError(
String? error) → RadioGroupFieldState< T> -
Updates the
error
field for the FormFieldState.override -
validate(
Map< String, FormFieldState> fields) → String? -
Validates the form field against its validation rules.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited