hey guys, how do we migrate to disable rippled of elements in 1.7.0.alpha, since RippleTheme is deprecated
CompositionLocalProvider(LocalRippleTheme provides NoRippleTheme) {
Switch(
checked = isSelected,
onCheckedChange = { onSwitchChange?.invoke(it) },
enabled = isPreferenceEnabled,
)
}
this was how I disabled the ripple
@Immutable
object NoRippleTheme : RippleTheme {
@Composable
override fun defaultColor(): Color = Color.Unspecified
@Composable
override fun rippleAlpha(): RippleAlpha = RippleAlpha(
draggedAlpha = 0f,
focusedAlpha = 0f,
hoveredAlpha = 0f,
pressedAlpha = 0f,
)
}
especially in the Switch m3 component
The migration guide mentions
private val DisabledRippleConfiguration =
RippleConfiguration(isEnabled = false)
but i can’t find it anywhere