I have a disabled switch but I still want it to be clickable. I tried to add a clickable
modifier but it still won't register the click when the switch itself is pressed
Switch(
modifier = Modifier
.clickable(
enabled = myBool,
onClick = onSwitch,
indication = null,
interactionSource = remember { MutableInteractionSource() },
)
.constrainAs(actionButton) {
top.linkTo(text.top)
end.linkTo(parent.end)
},
interactionSource = interactionSource,
checked = switchChecked,
enabled = if (myBool) false else actionButtonEnabled,
onSwitch = onSwitch,
)
How can I make it clickable as if it was enabled?