collectIsFocusedAsState

Functions summary

State<Boolean>

Subscribes to this MutableInteractionSource and returns a State representing whether this component is focused or not.

Cmn

Functions

InteractionSource.collectIsFocusedAsState

@Composable
fun InteractionSource.collectIsFocusedAsState(): State<Boolean>

Subscribes to this MutableInteractionSource and returns a State representing whether this component is focused or not.

FocusInteraction is typically set by androidx.compose.foundation.focusable and focusable components, such as androidx.compose.foundation.text.BasicTextField.

Returns
State<Boolean>

State representing whether this component is being focused or not