ZeroDropdownMenu<T> constructor
ZeroDropdownMenu<T> ({
- Key? key,
- required dynamic onSelected(
- T?
- List<
T> ? items, - InputDecorationType? inputDecorationType,
- ZeroTextfieldSize textfieldSize = ZeroTextfieldSize.small,
- List<
T> selectedItems = const [], - String? labelText,
- String? helperText,
- String? hintText,
- String? errorText,
- TextStyle? labelStyle,
- TextStyle? errorStyle,
- TextStyle? helperStyle,
- Widget? leadingIcon,
- Widget? trailingIcon,
- double? width,
- bool? enabled,
- FocusNode? focusNode,
- T? value,
- bool? alignedDropdown = true,
- TextEditingController? controller,
- bool enableFilter = true,
- bool enableSearch = true,
- List<
ZeroDropdownMenuEntry< ? entries,T> >
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');
}
}