ZeroDropdownMenu<T> constructor

ZeroDropdownMenu<T>({
  1. Key? key,
  2. required dynamic onSelected(
    1. T?
    )?,
  3. List<T>? items,
  4. InputDecorationType? inputDecorationType,
  5. ZeroTextfieldSize textfieldSize = ZeroTextfieldSize.small,
  6. List<T> selectedItems = const [],
  7. String? labelText,
  8. String? helperText,
  9. String? hintText,
  10. String? errorText,
  11. TextStyle? labelStyle,
  12. TextStyle? errorStyle,
  13. TextStyle? helperStyle,
  14. Widget? leadingIcon,
  15. Widget? trailingIcon,
  16. double? menuHeight,
  17. double? width,
  18. bool? enabled,
  19. FocusNode? focusNode,
  20. T? value,
  21. bool? alignedDropdown = true,
  22. TextEditingController? controller,
  23. bool enableFilter = true,
  24. bool enableSearch = true,
  25. List<ZeroDropdownMenuEntry<T>>? entries,
  26. ZeroMenuStyle? menuStyle,
})

Implementation

ZeroDropdownMenu(
    {super.key,
    required this.onSelected,
    this.items,
    this.inputDecorationType,
    this.textfieldSize = ZeroTextfieldSize.small,
    this.selectedItems = const [],
    this.labelText,
    this.helperText,
    this.hintText,
    this.errorText,
    this.labelStyle,
    this.errorStyle,
    this.helperStyle,
    this.leadingIcon,
    this.trailingIcon,
    this.menuHeight,
    this.width,
    this.enabled,
    this.focusNode,
    this.value,
    this.alignedDropdown = true,
    this.controller,
    this.enableFilter = true,
    this.enableSearch = true,
    this.entries,
    this.menuStyle}) {
  if (items != null) {
    assert(entries == null,
        'Only items or entries alone must be provided at the same time');
  }
  if (entries != null) {
    assert(items == null,
        'Only items or entries alone must be provided at the same time');
  }
}