androidxCommonMain.com.huanshankeji.compose.foundation.text.input.KeyboardCapitalization.androidxCommon.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compose-multiplatform-common
Show all versions of compose-multiplatform-common
Common wrappers of components (including layouts) and styles for Compose Multiplatform on (desktop/Android and web)
The newest version!
package com.huanshankeji.compose.foundation.text.input
import androidx.compose.ui.text.input.KeyboardCapitalization as PlatformKeyboardCapitalization
fun KeyboardCapitalization.toPlatformValue(): PlatformKeyboardCapitalization =
when (this) {
KeyboardCapitalization.None -> PlatformKeyboardCapitalization.None
KeyboardCapitalization.Characters -> PlatformKeyboardCapitalization.Characters
KeyboardCapitalization.Words -> PlatformKeyboardCapitalization.Words
KeyboardCapitalization.Sentences -> PlatformKeyboardCapitalization.Sentences
else -> throw IllegalArgumentException(toString())
}
fun KeyboardCapitalization?.toPlatformValue(): PlatformKeyboardCapitalization =
this?.toPlatformValue() ?: PlatformKeyboardCapitalization.None
© 2015 - 2025 Weber Informatics LLC | Privacy Policy