Compose Unstyled 2.0 is out! Check the official announcement blog ->
Property

LocalSoundEffect

The CompositionLocal to provide platform sound effects.

Source set: Common
val LocalSoundEffect =
staticCompositionLocalOf<SoundEffect> {
    object : SoundEffect {
        override fun playClickSound() {
        }
    }
}

The CompositionLocal to provide platform sound effects.

This is used to trigger sounds on user interaction, like clicks. To enable, disable, or customize sound interaction scopes, utilize SoundEffectOnInteraction.

Last updated: