SoundEffectOnInteraction

Functions summary

Unit

Configure whether sound effects are played for interactions (clicks) in the provided content.

android

Functions

SoundEffectOnInteraction

@Composable
fun SoundEffectOnInteraction(enabled: Boolean, content: @Composable () -> Unit): Unit

Configure whether sound effects are played for interactions (clicks) in the provided content. This acts as a configuration wrapper that intercepts the LocalSoundEffect and conditionally delegates or drops invocations of SoundEffect.playClickSound.

Parameters
enabled: Boolean

true if sound effects should be played on user interactions, false to silence them.

content: @Composable () -> Unit

The composable subtree to wrap.