Beagle v1.5 is no longer actively maintained. The documented version you are viewing may contain deprecated functionality. For up-to-date documentation, see the latest version .
Operadores | Exemplo | Açã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. |
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"))
)
)
)
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.