Basic concepts
Variables
Declare and initialize variables in the FlexiLayout language by giving a type and name or with the Let keyword, which infers type from an expression.
You can create and use variables in any section where code is entered. The name of a variable cannot be the same as the name of a global constant or an element.
Variables can be created in one of two ways.
For example:
To use the value of a variable, you must first initialize it with an assignment operator. Calling a variable that has not been initialized will result in an error during compilation or execution.
For example:
FlexiLayout Studio creates a variable with the specified name. The type of the variable is implicitly defined by the type of the expression it refers to. At the same time, the variable is initialized using the value of the expression.
Variables created this way serve as convenient shortcut names for deeply nested elements and other objects, making the notation shorter.
