tad
IndicationInstance
ContentDrawScope
class ClipPathIndication( val indication: Indication, val path: Path ) : Indication { @Composable override fun rememberUpdatedInstance(interactionSource: InteractionSource): IndicationInstance { val innerInstance = indication.rememberUpdatedInstance(interactionSource) return remember(interactionSource, this, innerInstance) { Instance(innerInstance, path) } } class Instance( val innerInstance: IndicationInstance, val path: Path ) : IndicationInstance { override fun ContentDrawScope.drawIndication() { drawContent() clipPath(path) { innerInstance.drawIndication() // Not allowed; we're in DrawScope now. } } } }
Nader Jawad
this
override fun ContentDrawScope.drawIndication() { drawContent() clipPath(path) { with (innerInstance) { this@drawIndication.drawIndication() } } }
DrawScope
clipPath
drawIndication
A modern programming language that makes developers happier.