From the course: Flutter Essential Training: Build for Multiple Platforms

What is state?

- [Instructor] All this while, we have been building a static UI that does not change over time. For example, notice the value of the text in the login page here, or the image. They will not really change while the user is using the app. Now, do you remember the default counter app? Let's run that again. So here on tapping of the floating action button, the value of the counter keeps incrementing. So this is not an example of static UI because some information on the screen keeps changing. Therefore, this is an example of a dynamic UI. Now, if I ask you what is the visible information that you see on the screen? What would be your answer? Now you may wonder what is a static information and dynamic information? Well, a screen with just an image, which never changes throughout the application life cycle is static information, or even whatever we build 'til now all holds static information. Or a screen like this counter app, which changes throughout the application life cycle because of user interaction, or maybe an app that shows time. The visible information keeps changing with time or user interaction, or because of some business logic. This visible information is called the state of the app. This value count that you see here, this is the local or UI state of the counter app. Or when there are user preferences shared throughout the app, like dark mode or light mode preferences, that is more of a global state of the app. Also called app state. Basically state is every visible information that exists in the memory and is mutated, or it changes because of an external interaction combined with business logic execution.

Contents