TDropdown<T> constructor

const TDropdown<T>({
  1. Key? key,
  2. required FutureOr<List<T>> items(
    1. String query,
    2. LoadProps?
    )?,
  3. T? selectedItem,
  4. String? labelText,
  5. String hintText = 'Select an option',
  6. void onChanged(
    1. T?
    )?,
  7. bool showSearchBox = false,
  8. DropdownPopupStyle popupStyle = DropdownPopupStyle.menu,
  9. Widget? title,
  10. String itemAsString(
    1. T
    )?,
  11. bool filterFn(
    1. T,
    2. String
    )?,
  12. String? validator(
    1. T?
    )?,
  13. bool enabled = true,
  14. Duration? searchDelay,
  15. Widget loadingIndicator = const CircularProgressIndicator(),
  16. String noResultsText = "No results found",
  17. bool compareFn(
    1. T,
    2. T
    )?,
  18. Widget? icon,
  19. Color? iconColor,
  20. String? errorText,
  21. String? helperText,
  22. Widget? suffixIcon,
  23. 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,
});