SwipeToRevealUndoAction

Functions summary

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

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

Functions

SwipeToRevealUndoAction

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

A composable which can be used for setting the undo 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.

modifier: Modifier = Modifier

Modifier to be applied on the action

interactionSource: MutableInteractionSource? = null

The MutableInteractionSource representing the stream of interactions with this action.

icon: (@Composable () -> Unit)? = null

An optional icon which will be displayed on the action

label: (@Composable () -> Unit)? = null

An optional label which will be displayed on the action. We strongly recommend to set icon and/or label for the action.