ZeroDropdown<T> constructor
ZeroDropdown<T> ({
- Key? key,
- required dynamic onChanged(
- dynamic
- required List<
T> items, - String? labelText,
- String? hintText,
- String? helperText,
- String? errorText,
- TextStyle? labelStyle,
- TextStyle? hintStyle,
- TextStyle? helperStyle,
- TextStyle? errorStyle,
- Widget? prefixIcon,
- Widget? suffixIcon,
- double? itemHeight,
- double? dropdownWidth,
- bool? alignedDropdown,
- T? value,
- Widget selectedMenuItemBuilder(
- T
- InputDecorationType inputDecorationType = InputDecorationType.outline,
- ZeroTextfieldSize? textfieldSize,
Implementation
factory ZeroDropdown({
Key? key,
required Function(dynamic) onChanged,
required List<T> items,
String? labelText,
String? hintText,
String? helperText,
String? errorText,
TextStyle? labelStyle,
TextStyle? hintStyle,
TextStyle? helperStyle,
TextStyle? errorStyle,
Widget? prefixIcon,
Widget? suffixIcon,
double? itemHeight,
double? dropdownWidth,
bool? alignedDropdown,
T? value,
Widget Function(T)? menuItemBuilder,
Widget Function(T)? selectedMenuItemBuilder,
InputDecorationType inputDecorationType = InputDecorationType.outline,
ZeroTextfieldSize? textfieldSize,
}) =>
ZeroDropdown._(
key: key,
inputDecorationType: inputDecorationType,
onChanged: onChanged,
items: items,
labelText: labelText,
labelStyle: labelStyle,
hintText: hintText,
helperText: helperText,
helperStyle: helperStyle,
errorText: errorText,
errorStyle: errorStyle,
icon: suffixIcon,
itemHeight: itemHeight,
dropdownWidth: dropdownWidth,
alignedDropdown: alignedDropdown,
textfieldSize: textfieldSize ?? ZeroTextfieldSize.small,
enableMultipleItems: false,
menuItemBuilder: menuItemBuilder,
selectedMenuItemBuilder: selectedMenuItemBuilder,
variant: DropdownVariant.form,
);