Goril.app Studio
  • Goril.app Studio Documentation
  • Setup
  • Quick Start
  • Main Pages
    • Architect
      • Toolbox
      • Explorer
      • Application Preview
      • Settings Panel
    • Storyboard
    • Assets
    • State
    • Custom Code
      • Custom Functions
      • Custom Actions
      • Custom Dependencies
      • Custom Widgets
    • Settings
      • General
      • Theme
      • Firebase
    • Action Flow Editor
  • Cookbook
    • My first application
      • Create the project
      • Create the Task model
      • Create the base HomePage Layout
      • Complete the HomePage Layout
      • Add Update Task Action in HomePage
      • Create the CreateTask component
      • Add Actions in CreateTast component
      • Create the EditTask component
      • Add Actions in EditTask component
Powered by GitBook
On this page
  • Creating a Local State Variable
  • Using a value in your application
  1. Main Pages

State

The State tab allows you tu create accessible and modifiable variable throughout every page and components.

PreviousAssetsNextCustom Code

Last updated 2 years ago

Creating a Local State Variable

In order to create a Local State variable follow the next steps :

  • Click on the Add Local State button

    • Fill the Field Name with the name of your variable

    • Choose if your variable should be Persisted or not

      The Application store the value of Persisted variables on the device's storage. If the application is killed and restarted the value is kept. Example : keeping the user preferences of email address remembered or not, to accelerate the sign-in process.

    • Choose the Field Type of your variable Optional : You can select List and/or Nullable to extends your variable's type.

    • You can add a Default Value to your variable, and can choose between a Static value or a Localized one

Using a value in your application

In order to use a Local State value in your application follow the next steps :

  • Select a Widget

  • In the Properties Section, select the functions button

  • Select the source to Local State

  • Click on the now red card From LocalState to set the Local State Variable

  • Click on Save

You have set a Local State Variable but the preview doesn't change ?

Check the following video to set a Preview Value

Local State
Creating a Local State variable