RepeatableClickableButton
fun RepeatableClickableButton(onClick: () -> Unit, modifier: Modifier = Modifier, onRepeatableClick: () -> Unit = onClick, onRepeatableClickEnd: () -> Unit = {}, enabled: Boolean = true, shape: Shape = CircleShape, colors: IconButtonColors = IconButtonDefaults.iconButtonColors(), border: BorderStroke? = null, buttonPadding: PaddingValues = PaddingValues(0.dp), indication: Indication? = ripple(), interactionSource: MutableInteractionSource? = null, content: @Composable BoxScope.() -> Unit)
A base button that can send single onClick event or repeated onRepeatableClick events by holding it down.
Code modified from https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:wear/compose/compose-material3/src/main/java/androidx/wear/compose/material3/IconButton.kt
Parameters
onClick
the single click event
onRepeatableClick
the repeated click event
onRepeatableClickEnd
the event when the repeated click ends
enabled
whether the button is enabled
shape
the shape of the button
colors
the colors of the button
border
the border of the button
buttonPadding
the padding around the button
indication
the indication of the button
interactionSource
the interaction source of the button
content
the content of the button