Styled

You will find here the description of the Styled function and its attributes details

What is it?

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:

AttributeTypeRequiredDefinition
selfStyleComponentComponent to receive the style.
blockStyle.() -> UnitFunction to apply styling.

How to use it?

Styled(
        self = Text("simple text")
    ) {
        backgroundColor = "#f1f1f1"
        flex.alignSelf = AlignSelf.CENTER
    }