Skip to main content

State Management

State management is a crucial concept focused on maintaining and controlling the state of an application. Simply put, it involves monitoring the changes within your app and updating the user interface to reflect these changes.

The UI (user interface) displays information based on state variables. When these state variables change, the UI updates to reflect the changes.

State Variables

In FlutterFlow, there are a few types of state variables that you can create:

app stage overview

App State is shared across multiple pages in the application. Component State is specific to a component. Page State is shared across widgets on the page.

  • State variables are themselves variables - meaning they have a name and a data type.
  • They also have an initial value that is set when you create the variable.
  • Once you create a state variable, it's value can be used to change the configuration of widget properties - like any other variable.
  • You can update the value of state variables using the Update State Variable action.

Creating State Variables

  • To create an App State variable, refer to this guide.
  • To create a Page State variable, refer to this guide.
  • To create a Component State variable, refer to this guide.

Note: Users cannot create widget state variables. These are automatically exposed by FlutterFlow when a Form widget is used.

Updating State Variables

Learn from video

You can learn more about state management from this video:

Was this article helpful?