AsyncDropDownFieldState<T> constructor
AsyncDropDownFieldState<T> (
- T value, {
- required Future<
List< items,DropDownItemState< >T> > - required String label,
- String? error,
- List<
ValidationRule< rules = const [],T> >
Creates a new instance of AsyncDropDownFieldState.
value
The initial value of the dropdown field (selected item).items
The list of individual item states within the dropdown (required).label
The label or name of the dropdown form field (required).rules
The 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,
List<ValidationRule<T>> rules = const [],
}) : super(
value: value,
label: label,
error: error,
rules: rules,
);