I want to disable ripple effect of a button, reading this document Migrate to Indication and Ripple APIs. in Says to replace this code
private object DisabledRippleTheme : RippleTheme {
@Composable
override fun defaultColor(): Color = Color.Transparent
@Composable
override fun rippleAlpha(): RippleAlpha = RippleAlpha(0f, 0f, 0f, 0f)
}
// ...
CompositionLocalProvider(LocalRippleTheme provides DisabledRippleTheme) {
Button {
// ...
}
}
with this code
CompositionLocalProvider(LocalRippleConfiguration provides null) {
Button {
// ...
}
}
but the newer code does not work in my case is there a version limitation to this code?
i tried to override RippleTheme, but i got this error Using ‘RippleTheme’ is an error. RippleTheme and LocalRippleTheme have been deprecated