Unresolved reference when trying to check if textfield is focused
I have some weird behaviour with FocusState in compose. I get this error Unresolved reference: isFocused when using FocusState.isFocused in this code (However I can use it elsewhere).
Here is my code:
@Composable
fun SearchBar(
modifier: Modifier = Modifier,
hint: String = "",
onSearch: (String) -> Unit = {}
){
var text by remember {
mutableStateOf("")
}
var isHintDisplayed by remember {
mutableStateOf(hint != "")
}
Box(modifier = modifier){...