Styled
is a function to help you organize the layout and style of your view. It is a simple way of setting various style properties at once.
See how the structure is represented:
Attribute | Type | Required | Definition |
---|---|---|---|
self | StyleComponent | ✓ | Component to receive the style. |
block | Style.() -> Unit | ✓ | Function to apply styling. |
Styled(
self = Text("simple text")
) {
backgroundColor = "#f1f1f1"
flex.alignSelf = AlignSelf.CENTER
}
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.