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.
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
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,
);