ZeroDropdown<T> constructor

ZeroDropdown<T>({
  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. double? itemHeight,
  15. double? dropdownWidth,
  16. bool? alignedDropdown,
  17. T? value,
  18. Widget menuItemBuilder(
    1. T
    )?,
  19. Widget selectedMenuItemBuilder(
    1. T
    )?,
  20. InputDecorationType inputDecorationType = InputDecorationType.outline,
  21. 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,
    );