AsyncDropDownFieldState<T> class

Represents the state of an asynchronous dropdown (select) form field.

An asynchronous dropdown form field extends the FormFieldState class, providing a way to manage the state of a dropdown input with asynchronously loaded items.

Inheritance
Available extensions

Constructors

AsyncDropDownFieldState(T value, {required Future<List<DropDownItemState<T>>> items, required String label, String? error, List<DropDownItemState<T>>? cachedItems, List<ValidationRule<T>> rules = const []})
Creates a new instance of AsyncDropDownFieldState.

Properties

cachedItems ↔ List<DropDownItemState<T>>?
getter/setter pair
error → String?
The error message associated with the form field, if any.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
items → Future<List<DropDownItemState<T>>>
The future that resolves to the list of individual item states within the dropdown.
final
label → String
The label or name of the form field.
finalinherited
nonNullItems → Future<List<DropDownItemState<T>>>

Available on AsyncDropDownFieldState<T?>, provided by the XAsyncDropDownFieldState extension

no setter
resolvedItems → Future<List<DropDownItemState<T>>>
no setter
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, Future<List<DropDownItemState<T>>>? items, String? error, String? label, bool? touched, bool? validateOnUpdate, List<ValidationRule<T>>? rules, List<DropDownItemState<T>>? cachedItems}) → AsyncDropDownFieldState<T>
Creates a new FormFieldState object by copying the existing state and replacing the specified fields with new values.
override
copyWithNullable({T? value}) → AsyncDropDownFieldState<T>
A null-tolerant version of copyWith, allowing you to explicitly set fields to null.
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) → AsyncDropDownFieldState<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