DropDownFieldState<T> constructor
DropDownFieldState<T> (
- T value, {
- required List<
DropDownItemState< items,T> > - required String label,
- String? error,
- List<
ValidationRule< rules = const [],T> >
Creates a new instance of DropDownFieldState.
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
DropDownFieldState(
T value, {
required this.items,
required String label,
String? error,
List<ValidationRule<T>> rules = const [],
}) : super(
value: value,
label: label,
error: error,
rules: rules,
);