toggleable

fun Modifier.toggleable(enabled: Boolean = true, role: Role? = Role.Switch, delayedVisibilityState: DelayedVisibilityState): Modifier

Toggleable

Parameters

enabled

whether this toggleable will handle input events and appear enabled for semantics purposes

role

the type of user interface element. Accessibility services might use this to describe the element or do customizations

delayedVisibilityState

the delayed visibility state to link


fun Modifier.toggleable(enabled: Boolean = true, role: Role? = Role.Switch, indication: Indication? = null, interactionSource: MutableInteractionSource?, delayedVisibilityState: DelayedVisibilityState): Modifier

Toggleable

Parameters

enabled

whether this toggleable will handle input events and appear enabled for semantics purposes

role

the type of user interface element. Accessibility services might use this to describe the element or do customizations

indication

indication to be shown when the modified element is pressed. By default, indication from LocalIndication will be used. Pass null to show no indication, or current value from LocalIndication to show theme default

interactionSource

MutableInteractionSource that will be used to emit PressInteraction.Press when this toggleable is being pressed.

delayedVisibilityState

the delayed visibility state to link