TSelect<T, V> constructor

const TSelect<T, V>({
  1. Key? key,
  2. String? label,
  3. String? tag,
  4. String? helperText,
  5. String? placeholder,
  6. bool isRequired = false,
  7. bool disabled = false,
  8. bool autoFocus = false,
  9. TTextFieldTheme? theme,
  10. VoidCallback? onTap,
  11. FocusNode? focusNode,
  12. TextEditingController? textController,
  13. V? value,
  14. ValueNotifier<V>? valueNotifier,
  15. ValueChanged<V>? onValueChanged,
  16. List<String? Function(V?)>? rules,
  17. Duration? validationDebounce,
  18. List<T>? items,
  19. bool multiLevel = false,
  20. bool filterable = true,
  21. String? footerMessage,
  22. VoidCallback? onShow,
  23. VoidCallback? onHide,
  24. ItemTextAccessor<T>? itemText,
  25. ItemValueAccessor<T, V>? itemValue,
  26. ItemKeyAccessor<T>? itemKey,
  27. ItemChildrenAccessor<T>? itemChildren,
  28. IconData? selectedIcon = Icons.check,
  29. TLoadListener<T>? onLoad,
  30. int itemsPerPage = 10,
  31. List<int> itemsPerPageOptions = const [],
  32. bool loading = false,
  33. String? search,
  34. int searchDelay = 2500,
  35. String itemToString(
    1. T
    )?,
  36. TPaginationController? controller,
  37. bool? readOnly,
})

Implementation

const TSelect({
  super.key,
  this.label,
  this.tag,
  this.helperText,
  this.placeholder,
  this.isRequired = false,
  this.disabled = false,
  this.autoFocus = false,
  this.theme,
  this.onTap,
  this.focusNode,
  this.textController,
  this.value,
  this.valueNotifier,
  this.onValueChanged,
  this.rules,
  this.validationDebounce,
  this.items,
  this.multiLevel = false,
  this.filterable = true,
  this.footerMessage,
  this.onShow,
  this.onHide,
  this.itemText,
  this.itemValue,
  this.itemKey,
  this.itemChildren,
  this.selectedIcon = Icons.check,
  // Server-side pagination
  this.onLoad,
  this.itemsPerPage = 10,
  this.itemsPerPageOptions = const [],
  this.loading = false,
  this.search,
  this.searchDelay = 2500,
  this.itemToString,
  this.controller,
  bool? readOnly,
}) : readOnly = readOnly ?? !filterable;