IndicationInstance


IndicationInstance is a specific instance of an Indication that draws visual effects on certain interactions, such as press or focus.

IndicationInstances can be stateful or stateless, and are created by Indication.rememberUpdatedInstance - they should be used in-place and not re-used between different indication modifiers.

Summary

Public functions

Unit

Draws visual effects for the current interactions present on this component.

Cmn

Public functions

drawIndication

fun ContentDrawScope.drawIndication(): Unit

Draws visual effects for the current interactions present on this component.

Typically this function will read state within this instance that is mutated by Indication.rememberUpdatedInstance. This allows IndicationInstance to just read state and draw visual effects, and not actually change any state itself.

This method MUST call ContentDrawScope.drawContent at some point in order to draw the component itself underneath any indication. Typically this is called at the beginning, so that indication can be drawn as an overlay on top.