Widget

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

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

Children tags which are reserved. These cannot be used by a @Children annotation. This is useful for ensuring tags from old, retired children are not accidentally reused.

Link copied to clipboard

Property tags which are reserved. These cannot be used by a @Property annotation. This is useful for ensuring tags from old, retired properties are not accidentally reused.

Link copied to clipboard
val tag: Int