PlayButton

fun PlayButton(modifier: Modifier = Modifier, onClick: () -> Unit, imageVector: ImageVector = Icons.Filled.PlayArrow, contentDescription: String = "Current Song is Playing", enabled: Boolean = true, colors: IconButtonColors = IconButtonDefaults.iconButtonColors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

A composable function that renders a Play button with customizable appearance and behavior.

This function is a wrapper around the standard IconButton composable with additional properties specifically designed for a play button.

Parameters

modifier

: Modifier to apply to the button (optional)

onClick

: Function to be called when the button is clicked (required)

imageVector

: The vector asset to be used as the button icon (default: Icons.Filled.PlayArrow)

contentDescription

: A content description for accessibility (default: "Current Song is Playing")

enabled

: Boolean indicating whether the button is clickable (default: true)

colors

: Colors to be applied to the button (default: IconButtonDefaults.iconButtonColors())

interactionSource

: A MutableInteractionSource object to provide information about user interactions (default: a new instance)

This function uses IconButton internally to create a clickable button with the specified icon and content description. Clicking the button triggers the onClick function.