Other operators

You will find a description of other operators.

What are they?

OperadoresExemploAção
isNull“@{isNull(context)}”Operator that verifies if the parameter is null.
isEmpty“@{isEmpty(")}”Operator that receives an input and verify if it is empty.
length“@{length(tamanho)}”Operator that receives an input and returns its size.

Example

A context with numbersArray id that has [0, 1, 2, 3, 4] as value and the operation length was used in one component Text to get the size of this array, see below:

fun screen() = Screen(child = 
    Container(
        context = ContextData(id = "numbersArray", value = arrayOf(0,1,2,3,4)),
        children = listOf(
            Text(text = "Array [0, 1, 2, 3, 4] has size: "),
            Text(
                expressionOf("@{length(numbersArray)}")
            ).applyStyle(Style(backgroundColor = "#00FF00"))
        )
    )
)


Last modified February 12, 2021: Fix/migrate images to aws (#299) (a7bb5457)