All Downloads are FREE. Search and download functionalities are using the official Maven repository.

androidxCommonMain.com.huanshankeji.compose.foundation.text.input.KeyboardCapitalization.androidxCommon.kt Maven / Gradle / Ivy

Go to download

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