commonMain.com.arkivanov.decompose.extensions.compose.utils.InputConsumingOverlay.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of extensions-compose-jvm Show documentation
Show all versions of extensions-compose-jvm Show documentation
Kotlin Multiplatform lifecycle-aware business logic components
The newest version!
package com.arkivanov.decompose.extensions.compose.utils
import androidx.compose.foundation.layout.Box
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.pointer.pointerInput
@Composable
internal fun InputConsumingOverlay(modifier: Modifier) {
Box(
modifier = modifier.pointerInput(Unit) {
awaitPointerEventScope {
while (true) {
val event = awaitPointerEvent()
event.changes.forEach { it.consume() }
}
}
}
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy