Swiftybase
Function StackIf condition

All Of

Returns true if all conditions are met.
This function is used to easily combine multiple conditions into a single function for better readability and maintainability.

In this example, we define two variables, name and age, and use an if statement with two conditions. The conditions are grouped with an "any" logic, meaning the block will execute if any of the conditions are satisfied.

The given flow contains the following logic:

  1. First Condition: "All Of" Function
    • This checks multiple conditions:
      • name is equal to "rebaz".
      • age is between 20 and 40 (inclusive).
    • If both conditions are true, the associated condition block is executed.

Group

  1. Second Condition: Single Condition Check
    • If the "All Of" function returns false, the next condition is checked:
      • Whether age is equal to 30.
    • If this condition is true, its corresponding logic is executed.

Group