ZeroDropdown<T>.multiple constructor

ZeroDropdown<T>.multiple({
  1. Key? key,
  2. required dynamic onChanged(
    1. dynamic
    ),
  3. required List<T> items,
  4. String? labelText,
  5. String? hintText,
  6. String? helperText,
  7. String? errorText,
  8. TextStyle? labelStyle,
  9. TextStyle? hintStyle,
  10. TextStyle? helperStyle,
  11. TextStyle? errorStyle,
  12. Widget? prefixIcon,
  13. Widget? suffixIcon,
  14. List<T> selectedItems = const [],
  15. double? itemHeight,
  16. double? dropdownWidth,
  17. bool? alignedDropdown,
  18. T? value,
  19. Widget menuItemBuilder(
    1. T
    )?,
  20. Widget selectedMenuItemBuilder(
    1. T
    )?,
  21. InputDecorationType inputDecorationType = InputDecorationType.outline,
  22. MultipleItemsVariant? multipleItemsVariant,
  23. ZeroTextfieldSize textfieldSize = ZeroTextfieldSize.small,
  24. SelectedItemsStyle selectedItemsStyle = SelectedItemsStyle.text,
  25. dynamic onMenuStateChange(
    1. 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,
    );