interactionStyle
fun Modifier.interactionStyle(interactionSource: InteractionSource?, enabled: Boolean = true, selected: Boolean = false, style: Style): Modifier
Sets a Style on the element that reacts to interactions from the provided interactionSource.
Since
0.2.0
Parameters
interactionSource
The InteractionSource used to listen to user interactions such as pressed and focus.
enabled
Whether the element is currently enabled.
selected
Whether the element is currently selected.
style
The Style to apply to the element.
fun Modifier.interactionStyle(interactionSource: InteractionSource?, enabled: Boolean = true, selected: Boolean = false, block: StyleScope.() -> Unit): Modifier
Sets a Style on the element that reacts to interactions from the provided interactionSource.
Since
0.3.4
Parameters
interactionSource
The InteractionSource used to listen to user interactions such as pressed and focus.
enabled
Whether the element is currently enabled.
selected
Whether the element is currently selected.
block
Lambda to apply style properties. The block provides access to the elements current InteractionState (focused, pressed, selected, etc) through StyleScope.