ComposableName

@Target(allowedTargets = [])
annotation class ComposableName(val name: String)

Returns the name of the current Composable. See ComposableInvalidationTraceTable.currentComposableName.

You can get name directly from the property delegation. See ComposableName.getValue.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
operator fun ComposableName.getValue(thisRef: Any?, property: Any?): String

val name: String by ComposableName("MyComposable") // result: "MyComposable"