TDropdown<T> constructor
const
TDropdown<T> ({
- Key? key,
- required FutureOr<
List< items(T> >- String query,
- LoadProps?
- T? selectedItem,
- String? labelText,
- String hintText = 'Select an option',
- void onChanged(
- T?
- bool showSearchBox = false,
- DropdownPopupStyle popupStyle = DropdownPopupStyle.menu,
- Widget? title,
- String itemAsString(
- T
- bool filterFn(
- T,
- String
- String? validator(
- T?
- bool enabled = true,
- Duration? searchDelay,
- Widget loadingIndicator = const CircularProgressIndicator(),
- String noResultsText = "No results found",
- bool compareFn(
- T,
- T
- Widget? icon,
- Color? iconColor,
- String? errorText,
- String? helperText,
- Widget? suffixIcon,
- Widget? prefixIcon,
Implementation
const TDropdown({
super.key,
required this.items,
this.selectedItem,
this.labelText,
this.hintText = 'Select an option',
this.onChanged,
this.showSearchBox = false,
this.popupStyle = DropdownPopupStyle.menu,
this.title,
this.itemAsString,
this.filterFn,
this.validator,
this.enabled = true,
this.searchDelay,
this.loadingIndicator = const CircularProgressIndicator(),
this.noResultsText = "No results found",
this.compareFn,
this.icon,
this.iconColor,
this.errorText,
this.helperText,
this.suffixIcon,
this.prefixIcon,
});