composeUiMain.com.huanshankeji.compose.foundation.text.KeyboardActions.composeUi.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compose-multiplatform-html-unified-common
Show all versions of compose-multiplatform-html-unified-common
Common wrappers of components (including layouts) and modifiers for Compose UI (Android, desktop (JVM), iOS, and web (Kotlin/Wasm)) and Compose HTML
The newest version!
package com.huanshankeji.compose.foundation.text
import com.huanshankeji.compose.foundation.text.input.ImeAction
import com.huanshankeji.compose.foundation.text.input.toPlatformValue
import androidx.compose.foundation.text.KeyboardActionScope as PlatformKeyboardActionScope
import androidx.compose.foundation.text.KeyboardActions as PlatformKeyboardActions
fun KeyboardActions.toPlatformValue(): PlatformKeyboardActions =
onAny?.let {
PlatformKeyboardActions {
toCommonValue().it()
}
} ?: PlatformKeyboardActions()
fun PlatformKeyboardActionScope.toCommonValue(): KeyboardActionScope =
object : KeyboardActionScope {
override fun defaultKeyboardAction(imeAction: ImeAction) =
[email protected](imeAction.toPlatformValue())
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy