composeUiMain.com.huanshankeji.compose.foundation.text.input.ImeAction.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.input
import androidx.compose.ui.text.input.ImeAction as PlatformImeAction
fun ImeAction.toPlatformValue(): PlatformImeAction =
when (this) {
ImeAction.Default -> PlatformImeAction.Default
ImeAction.None -> PlatformImeAction.None
ImeAction.Go -> PlatformImeAction.Go
ImeAction.Search -> PlatformImeAction.Search
ImeAction.Send -> PlatformImeAction.Search
ImeAction.Previous -> PlatformImeAction.Previous
ImeAction.Next -> PlatformImeAction.Next
ImeAction.Done -> PlatformImeAction.Done
else -> throw IllegalArgumentException(toString())
}
fun ImeAction?.toPlatformValue(): PlatformImeAction =
this?.toPlatformValue() ?: PlatformImeAction.Default
© 2015 - 2025 Weber Informatics LLC | Privacy Policy