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 |
---|---|---|
insert | “@{insert(array, 5)}” | Operators that receives two inputs, where the first parameter is an array and the second is the element that you want to insert in this array. |
remove | “@{remove(array, 1)}” | Operators that receives two inputs, where the first parameter is an array and the second is the element that you want to remove this array. |
removeIndex | “@{removeIndex(array, 2)}” | Operators that receives two inputs, where the first parameter is an array and the second is the index that you want to remove this array. |
contains | “@{contains(array, 3)}” | Operators that receives two inputs, where the first parameter is an array and the second is the element that you want to verify if it contains in this array. |
See the example of a screen where the a context was declared with numbersArray
id with the values [0, 1, 2, 3, 4], this context is used in the removeIndex operation in the text component text
, where it removes the element of index 2.
fun screen() = Screen(child =
Container(
context = ContextData(id = "numbersArray", value = arrayOf(0,1,2,3,4)),
children = listOf(
Text(text = "Array was [0, 1, 2, 3, 4] and after removing index 2 now is: "),
Text(
expressionOf("@{removeIndex(numbersArray, 2)}")
).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.