Class

StyleStateKey

The key to a StyleState value.

StyleStateKeySample

@Sampled
@Composable
fun StyleStateKeySample() {
    // Create a new StyleStateKey
    val playingStateKey = StyleStateKey(false)

    // In the module scope are the following declarations:
    //
    //    // A custom style scope which has all the properties of StyleScope
    //    interface MediaPlayerStyleScope : StyleScope
    //
    //    // A custom style type
    //    fun interface MediaPlayerStyle : CustomStyle<MediaPlayerStyleScope> {
    //        companion object : MediaPlayerStyle {
    //            override fun MediaPlayerStyleScope.applyStyle() { }
    //        }
    //    }

    // Introduce a function to convert the custom style to a Style
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: