curioustechizen
02/17/2025, 11:10 AMWindowInsets.isImeVisible
on iOS?Ivan Matkov
02/17/2025, 11:44 AMSkaldebane
02/17/2025, 12:52 PMWindowInsets.ime
, if it's non-zero, then the IME is visible.Skaldebane
02/17/2025, 1:18 PM@Composable
fun keyboardVisibilityAsState(): State<Boolean> {
val isImeVisible = WindowInsets.ime.getBottom(LocalDensity.current) > 0
return rememberUpdatedState(isImeVisible)
}
This is what I use in my apps, works pretty well.