onSearchFocusChanged property

ValueChanged<bool>? onSearchFocusChanged
final

Called whenever the search field gains or loses keyboard focus.

true — keyboard is visible, field is active. false — keyboard dismissed, field is unfocused.

Use this to switch the body content between a focused search state (e.g. "No Recent Searches") and an unfocused search state (e.g. a topic browse grid), without fully closing the search bar.

Implementation

final ValueChanged<bool>? onSearchFocusChanged;