AsyncDropDownFieldState<T> constructor
AsyncDropDownFieldState<T> (
- T value, {
- required Future<
List< items,DropDownItemState< >T> > - required String label,
- String? error,
- List<
DropDownItemState< ? cachedItems,T> > - List<
ValidationRule< rules = const [],T> >
Creates a new instance of AsyncDropDownFieldState.
valueThe initial value of the dropdown field (selected item).itemsThe list of individual item states within the dropdown (required).labelThe label or name of the dropdown form field (required).rulesThe list of validation rules to apply to the dropdown field (default is an empty list).
Implementation
AsyncDropDownFieldState(
T value, {
required this.items,
required String label,
String? error,
this.cachedItems,
List<ValidationRule<T>> rules = const [],
}) : super(
value: value,
label: label,
error: error,
rules: rules,
);