ZeroDropdown<T>.icon constructor
ZeroDropdown<T>.icon ({})
Constructor to create dropdown with only icon as the button. No Input Decoration needed
Implementation
factory ZeroDropdown.icon({
Key? key,
required Function(dynamic) onChanged,
required List<T> items,
Widget? icon,
/// The dimension (widht and height) of the Icon. If null, it defaults to [TextfieldSize.small.height]
double? size,
double? dropdownWidth,
T? value,
Widget Function(T)? menuItemBuilder,
Widget Function(T)? selectedMenuItemBuilder,
}) =>
ZeroDropdown._(
key: key,
inputDecorationType: InputDecorationType.underline,
onChanged: onChanged,
items: items,
enableMultipleItems: false,
menuItemBuilder: menuItemBuilder,
icon: icon,
dropdownWidth: dropdownWidth,
selectedMenuItemBuilder: selectedMenuItemBuilder,
itemHeight: size ?? ZeroTextfieldSize.small.height,
variant: DropdownVariant.icon,
);