SwipeToRevealPrimaryAction

Functions summary

Unit
@ExperimentalWearMaterialApi
@Composable
SwipeToRevealPrimaryAction(
    revealState: RevealState,
    onClick: () -> Unit,
    icon: @Composable () -> Unit,
    label: @Composable () -> Unit,
    modifier: Modifier,
    interactionSource: MutableInteractionSource?
)

A composable which can be used for setting the primary action of material SwipeToRevealCard and SwipeToRevealChip.

Functions

SwipeToRevealPrimaryAction

@ExperimentalWearMaterialApi
@Composable
fun SwipeToRevealPrimaryAction(
    revealState: RevealState,
    onClick: () -> Unit,
    icon: @Composable () -> Unit,
    label: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    interactionSource: MutableInteractionSource? = null
): Unit

A composable which can be used for setting the primary action of material SwipeToRevealCard and SwipeToRevealChip.

Parameters
revealState: RevealState

The RevealState of the SwipeToReveal where this action is used.

onClick: () -> Unit

A lambda which gets triggered when the action is clicked.

icon: @Composable () -> Unit

The icon which will be displayed initially on the action

label: @Composable () -> Unit

The label which will be displayed on the expanded action

modifier: Modifier = Modifier

Modifier to be applied on the action

interactionSource: MutableInteractionSource? = null

The MutableInteractionSource representing the stream of interactions with this action.