Variables can be defined and manipulated through ValueType and UIType. ValueType is useful to define and process the variables. For example,
Copy " quiz_status " : ValueType (
type = " str " ,
value = ' default ' ,
),
Copy " quiz_idx " : ValueType (
type = " int " ,
value = " ${min(quiz_idx + 1, len(words) - 1)} " ,
), In the above example, we can use ${} to wrap an expression to update a variable called qui_idx.
the type of the ValueType can be
Copy [ " str " , " int " , " float " , " bool " , " list " , " dict " ]
Variables from user inputs are handled by UIType. We support the following UITypes
to choose from some choices
often used as triggers, to submit a form or jump to next pages
display some information using plain-text
display an image, the size of the image can be manually controlled
display a group of images
play a audio, the value need to be the path of the audio
DisplayDropdown
used when the choices need to be dynamically updated