ZeroDropdown<T>.multiple constructor
ZeroDropdown<T>.multiple ({
- 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,
- List<
T> selectedItems = const [], - double? itemHeight,
- double? dropdownWidth,
- bool? alignedDropdown,
- T? value,
- Widget selectedMenuItemBuilder(
- T
- InputDecorationType inputDecorationType = InputDecorationType.outline,
- MultipleItemsVariant? multipleItemsVariant,
- ZeroTextfieldSize textfieldSize = ZeroTextfieldSize.small,
- SelectedItemsStyle selectedItemsStyle = SelectedItemsStyle.text,
- dynamic onMenuStateChange(
- bool isOpen
Implementation
factory ZeroDropdown.multiple(
{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,
List<T> selectedItems = const [],
double? itemHeight,
double? dropdownWidth,
bool? alignedDropdown,
T? value,
Widget Function(T)? menuItemBuilder,
Widget Function(T)? selectedMenuItemBuilder,
InputDecorationType inputDecorationType = InputDecorationType.outline,
MultipleItemsVariant? multipleItemsVariant,
ZeroTextfieldSize textfieldSize = ZeroTextfieldSize.small,
SelectedItemsStyle selectedItemsStyle = SelectedItemsStyle.text,
Function(bool isOpen)? onMenuStateChange}) =>
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 ?? textfieldSize.height,
dropdownWidth: dropdownWidth,
alignedDropdown: alignedDropdown,
selectedItems: selectedItems,
textfieldSize: textfieldSize,
enableMultipleItems: true,
menuItemBuilder: menuItemBuilder,
selectedMenuItemBuilder: selectedMenuItemBuilder,
multipleItemsVariant:
multipleItemsVariant ?? MultipleItemsVariant.plain,
selectedItemsStyle: selectedItemsStyle,
onMenuStateChange: onMenuStateChange,
);