Function

freeFocus

Use this function to send a request to free focus when one of the components associated with this FocusRequester is in a Captured state.

freeFocus

Source set: Common
public fun FocusRequesterModifierNode.freeFocus(): Boolean

Use this function to send a request to free focus when one of the components associated with this FocusRequester is in a Captured state. If a component frees focus, it will send a FocusState object to its associated onFocusChanged modifiers where [FocusState.isCaptured]() == false.

When a component is in a Captured state, all focus requests from other components are declined. .

Return

true if the captured focus was successfully released. i.e. At the end of this operation, one of the components associated with this focusRequester freed focus.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: