You will find here the definition of Condition and more details about its attributes

What is it?

It is an action that has a boolean parameter and, according to the value, the action runs onTrue or onFalse.

conditionBoolean or BindingCondition to define which action will run.
onTrueList<Action>List of actions that it will be run when the condition is true.
onFalseList<Action>List of actions that it will be run when the condition is false.

How to use it?

The example below is a Container with a context that has a 18 value and the event onPress of the button is defined as an action with the Condition type, that verifies if the values is the same as 21 and shows an Alert depending on the context value.

    context = ContextData(
        id = "age",
        value = 18
    children = listOf(
            text = "Is equal to 21?",
            onPress = listOf(
                     condition = "@{eq(age, 21)}",
                     onTrue = listOf(
                         Alert(message = "The condition is true")
                     onFalse = listOf(
                         Alert(message = "The condition is false")


Last modified March 5, 2021: fix: change table docs (#385) (ea0ea742)