hideOverlay method

void hideOverlay({
  1. bool clearValue = true,
})

Hides the search overlay.

If clearValue is true (default), the overlay value will be cleared.

Implementation

void hideOverlay({bool clearValue = true}) {
  if (!_isOverlayVisible) return;
  _isOverlayVisible = false;
  // Don't reset _focusedIndex here - preserve it for when overlay reopens

  if (clearValue) {
    _overlayValue = null;
  }

  if (_config.clearOnClose) {
    clearSearch();
  }

  notifyListeners();
}