AnimatedMediaButton
fun AnimatedMediaButton(onClick: () -> Unit, compositionResult: LottieCompositionResult, contentDescription: String, modifier: Modifier = Modifier, onRepeatableClick: () -> Unit? = null, onRepeatableClickEnd: () -> Unit? = null, enabled: Boolean = true, colors: IconButtonColors = MediaButtonDefaults.mediaButtonDefaultColors(), interactionSource: MutableInteractionSource? = null, buttonPadding: PaddingValues = PaddingValues(0.dp), iconSize: Dp = IconButtonDefaults.LargeIconSize, iconAlign: Alignment = Alignment.Center)
A button that animates a Lottie composition when clicked.
Parameters
onClick
The callback to invoke when the button is clicked.
compositionResult
The Lottie composition to animate.
contentDescription
The content description for the button.
modifier
The modifier to apply to the button.
onRepeatableClick
The callback to invoke when the button is repeatedly clicked (optional).
onRepeatableClickEnd
The callback to invoke when the button is no longer repeatedly clicked (optional).
enabled
Whether the button is enabled (optional).
colors
The colors to apply to the button (optional).
interactionSource
The interaction source to apply to the button (optional).
buttonPadding
The padding to be applied around the button. Defafults to Zero (optional).
iconSize
The size of the icon (optional).
iconAlign
The alignment of the icon (optional).