hey guys. looks like `pointerInput` modifier doesn...
# compose
d
hey guys. looks like
pointerInput
modifier doesn't work with
Button
. how can i detect
on released
event on a button?
o
I think you could observe an
InteractionSource
of the button:
Copy code
val interactionSource = remember { MutableInteractionSource() }
LaunchedEffect(interactionSource) {
    interactionSource.interactions.collect {
        if (it is PressInteraction.Release) {
            Log.d("[InteractionSource]", "Release the button's soul!")
        }
    }
}
Button(
    onClick = { ... },
    interactionSource = interactionSource
) {
    Text("Tap on me ")
}