AnimatedPlayPauseProgressButton
fun AnimatedPlayPauseProgressButton(onPlayClick: () -> Unit, onPauseClick: () -> Unit, playing: Boolean, trackPositionUiModel: TrackPositionUiModel, modifier: Modifier = Modifier, colorScheme: ColorScheme = MaterialTheme.colorScheme, enabled: Boolean = true, interactionSource: MutableInteractionSource? = null, isAnyButtonPressed: State<Boolean> = remember { mutableStateOf(false) }, progressStrokeWidth: Dp = MIDDLE_BUTTON_PROGRESS_STROKE_WIDTH, rotateProgressIndicator: Flow<Unit> = flowOf(), content: @Composable () -> Unit = { AnimatedPlayPauseButtonContent(playing) })
A button that animates between a play and pause icon.
Parameters
onPlayClick
Callback to invoke when the play button is clicked.
onPauseClick
Callback to invoke when the pause button is clicked.
playing
Whether the button should be in the play or pause state.
trackPositionUiModel
The track position UI model.
modifier
The Modifier to apply to the button.
colorScheme
The ColorScheme used for the button.
enabled
Whether the button is enabled.
interactionSource
The interaction source to use for the button.
isAnyButtonPressed
Whether any button is pressed.
progressStrokeWidth
The width of the progress stroke.
rotateProgressIndicator
The flow of events to rotate the progress indicator.
content
The content of the button.