onSearchListItemSelected method

void onSearchListItemSelected(
  1. T? item
)

Implementation

void onSearchListItemSelected(T? item) {
  overlaySearchList?.remove();

  overlaySearchList = null;
  _focusNode.unfocus();
  setState(() {
    notifier.value = item;
    isFocused = false;
    isRequiredCheckFailed = false;
  });
  if (widget.onItemSelected != null) {
    widget.onItemSelected!(item);
  }
}