Widget

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Widget(val tag: Int)

Annotates a data class which represents a widget in a UI tree. Each widget in a Schema must have a unique tag among all @Widget annotations in the Schema.

All the properties in the class must be annotated with either Property or Children.

@Widget(1)
data class Box(
@Property(1) val orientation: Orientation,
@Children val children: () -> Unit,
)

Properties

Link copied to clipboard
val tag: Int