What is Data?
Data is simply information that lives in your application. It determines what your users see and how your app behaves.
Data Representation
In Digia, data can be represented in two ways:
Static Data: Hardcoded information that never changes.
Example: A "Welcome" title text, a fixed background color, or a "Terms of Service" paragraph.
Dynamic Data: Information that changes based on user interaction, API responses, or time.
Example: The logged-in user's name, a list of products from a database, or the current toggle state of a switch.
To handle Dynamic Data, we use Variables.
Variables
Think of a variable as a container for value. Instead of typing "John Doe" directly into a Text widget (Static), you bind the Text widget to a variable called userName. When the value in the userName container changes, the Text widget automatically updates to show the new value.
In Digia, variables are strictly typed. Use the Data Types section to understand the different kinds of variables available (Strings, Numbers, JSON, etc.).
Last updated