DropSearch<T> constructor
DropSearch<T> ({
- Key? key,
- ItemAsString<
T> ? itemToString, - List<
T> ? items, - String? hintText,
- bool? immediateClear = false,
- dynamic onChanged(
- T?
- T? selectedItem,
- dynamic onClear()?,
- TextEditingController? controller,
- bool? showSuffixIcon = true,
Implementation
DropSearch(
{super.key,
this.itemToString,
this.items,
this.hintText,
this.immediateClear = false,
this.onChanged,
this.selectedItem,
this.onClear,
TextEditingController? controller,
this.showSuffixIcon = true}) {
if (controller != null) {
_searchController = controller;
}
_searchController.addListener(() {
_showClearIcon.value = _searchController.isNotNullOrEmpty;
});
}