DropSearch<T> constructor

DropSearch<T>({
  1. Key? key,
  2. ItemAsString<T>? itemToString,
  3. List<T>? items,
  4. String? hintText,
  5. bool? immediateClear = false,
  6. dynamic onChanged(
    1. T?
    )?,
  7. T? selectedItem,
  8. dynamic onClear()?,
  9. TextEditingController? controller,
  10. 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;
  });
}