Skip to content

Commit 1bcd955

Browse files
committed
Fix State Management docs + links cleanup
1 parent 2be42dd commit 1bcd955

File tree

28 files changed

+106
-70
lines changed

28 files changed

+106
-70
lines changed

docs/ff-concepts/adding-customization/custom-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ You can't have imports in a custom function. To be able to add imports, consider
7171
<details>
7272
<summary>Getting error: The function 'FFAppState' isn't defined.</summary>
7373

74-
You can't use the app state variable (i.e., FFAppState().variablename) directly in your custom
74+
You can't use the app state variable (i.e., `FFAppState().variablename`) directly in your custom
7575
function code. Instead, you can pass the app state variable as a parameter and then use it in your code.
7676

7777
</details>

docs/ff-concepts/navigation-routing/deep-dynamic-linking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ To set the page URL:
110110
#### 3. Sharing deep link
111111

112112
You can share the deep link of the current page by adding
113-
the [share action](/actions/actions/share/share).
113+
the [share action](share-action.md).
114114

115115
To share the deep link of the current page:
116116

@@ -320,7 +320,7 @@ To set the page URL:
320320

321321
You can share the dynamic link of the current page by adding the [**Generate Current Page Link
322322
**](generate-current-page-link.md)
323-
action and then sharing it using the [**Share Action**](/actions/actions/share/share).
323+
action and then sharing it using the [**Share Action**](share-action.md).
324324

325325
To share the dynamic link of the page:
326326

docs/ff-concepts/state-management/state-management.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
title: State Management
33
description: An overview of state management in FlutterFlow
44
---
5-
5+
# State Management
66
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.
77

8-
You can think of the UI as a function of your state variables, where changes in these variables directly influence what the UI displays.
8+
The UI (user interface) displays information based on state variables. When these state variables change, the UI updates to reflect the changes.
9+
10+
## State Variables
911

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

@@ -15,27 +17,35 @@ In FlutterFlow, there are a few types of state variables that you can create:
1517
</figure>
1618

1719

18-
- State variables are themselves **variables** - meaning they have a *name* and a *data type*.
20+
- State variables are themselves [**variables**](../../resources/data-representation/overview.md#variable) - meaning they have a *name* and a *data type*.
1921
- They also have an initial value that is set when you create the variable.
2022
- Once you create a state variable, it's value can be used to change the configuration of widget properties - like any other variable.
21-
- You can update the value of state variables using the *Update State Variable* action.
23+
- You can update the value of state variables using the **[Update State Variable](#updating-state-variables)** action.
24+
25+
### Creating State Variables
26+
- To create an **App State variable**, refer to this **[guide](../../resources/data-representation/app-state.md#create-app-state-variable)**.
27+
- To create a **Page State variable**, refer to this [**guide**](../../resources/ui-building-blocks/pages/page-lifecycle.md#creating-a-page-state).
28+
- To create a **Component State variable**, refer to this [**guide**](../../resources/ui-building-blocks/components/user-defined-components/component-lifecycle.md#creating-a-component-state).
29+
30+
Note: Users cannot create **widget state variables**. These are automatically exposed by FlutterFlow when a Form widget is used.
31+
32+
33+
34+
### Updating State Variables
35+
- To update an **App State variable**, refer to this **[guide](../../resources/data-representation/app-state.md#update-app-state-action)**.
36+
- Refer to the [**Page Lifecycle**](../../resources/ui-building-blocks/pages/page-lifecycle.md) guide to learn about updating **[Page State variables](../../resources/ui-building-blocks/pages/page-lifecycle.md#update-page-state-action)**.
37+
- Refer to the [**Component Lifecycle**](../../resources/ui-building-blocks/components/user-defined-components/component-lifecycle.md) guide to learn about updating **[Component State variables](../../resources/ui-building-blocks/components/user-defined-components/component-lifecycle.md#update-component-state-action)**.
2238

39+
<p></p>
40+
41+
42+
:::tip[Learn from video]
2343
You can learn more about state management from this video:
2444
<div class="video-container">
2545
<iframe src="https://www.youtube.com/embed/jD6L4xjYjJA?si=-RjniUB-K0ZsMoB1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
2646
</div>
27-
28-
<p></p>
29-
30-
:::tip
31-
To learn more about state management in FlutterFlow, read up on
32-
[**Variables**](../../resources/data-representation/overview.md#variable) and how
33-
[**Page
34-
State**](../../resources/ui-building-blocks/pages/page-lifecycle.md#page-state), or
35-
[**Component State**](#) or [**App State variables**](#) are modified in FlutterFlow.
3647
:::
3748

3849

3950

4051

41-
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"label": "Authentication",
3-
"position": 1
2+
"label": "Authentication"
43
}

docs/ff-integrations/database/local-sql/sqlite/quickstart.md renamed to docs/ff-integrations/database/local-sql/quickstart.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
slug: /integrations/database/sqlite/quickstart
2+
slug: /integrations/database/sqlite
33
title: SQLIte Quickstart
44
description: Learn how to quickly get started with SQLite in your FlutterFlow app for local data storage.
55
tags: [FlutterFlow, SQLite, Database, Quickstart, Local Storage]
@@ -38,7 +38,7 @@ Here are the steps to build such an example:
3838

3939
To enable SQLite in FlutterFlow, navigate to Settings and Integrations > Integrations > SQLite > switch on the **Enable SQLite** toggle.
4040

41-
![img.png](img.png)
41+
![img.png](imgs/img.png)
4242

4343
## 2. Database configuration
4444

@@ -86,7 +86,7 @@ In general, to add any query, you need to provide a name, the query statement, a
8686

8787
* To use variables, simply use the syntax `${variableName}`. For example: `SELECT \* FROM Notes WHERE id = ${noteId}`
8888
* When passing string or text data in queries, enclose variables in single quotes, like `${title}`, to signify them as strings.
89-
![img_1.png](img_1.png)
89+
![img_1.png](imgs/img_1.png)
9090
:::
9191

9292
Below are the queries that we'll require for this example:
@@ -154,7 +154,7 @@ com/embed/aa0bb7bea67145c8b0b61ce57485a5c2?sid=9d950aba-c498-484c-8507-c795bee74
154154

155155
To show a list of notes, you can use the **ListView** > **Container** widgets to design a page that looks like the following:
156156

157-
![img_2.png](img_2.png)
157+
![img_2.png](imgs/img_2.png)
158158

159159
Now, on the ListView widget, add a [SQLite backend query](/data-and-backend/backend-query/sqlite-query) and display data in UI elements.
160160

@@ -204,7 +204,7 @@ com/embed/bb775d5da5614117ac6fbe6542b6c29f?sid=877e565c-be16-4c77-a92c-9a6a95408
204204

205205
For updating note values, like marking a note as completed or modifying other fields, utilize
206206
the SQLite Query Action and set the type to **Update Query**. Here, set the Query Name to
207-
[UpdateNote](#3-updatenote).
207+
[Update Note](#3-updatenote).
208208

209209

210210

@@ -215,19 +215,19 @@ com/embed/35564ad5e8be4f58aa72527bc6818183?sid=2740d823-df42-49c3-ae54-8e0e95a72
215215

216216
:::info
217217

218-
* In this example, we are updating the note on a bottom sheet component. To provide a better user experience, we initially display the current values of the note, ensuring that users have a clear idea of what they are going to edit. To display the note values in bottom sheet, we [pass](../../../../ff-concepts/navigation-routing/passing-data.md) the current note with **Type** set to **SQLite Row**.
218+
* In this example, we are updating the note on a bottom sheet component. To provide a better user experience, we initially display the current values of the note, ensuring that users have a clear idea of what they are going to edit. To display the note values in bottom sheet, we [pass](../../../ff-concepts/navigation-routing/passing-data.md) the current note with **Type** set to **SQLite Row**.
219219

220-
![img_3.png](img_3.png)
220+
![img_3.png](imgs/img_3.png)
221221

222222
* When updating a date value, we also verify if the date has been modified. If there's no change, we simply pass back the same value we received.
223223
:::
224224

225225
## 7. Delete note
226226

227-
You can delete an existing note from the database using the [SQLite query action](../../../../resources/control-flow/backend-logic/backend-query/sqlite-query.md) with the type set to *Update Query* and Query Name to **Delete Note**.
227+
You can delete an existing note from the database using the [SQLite query action](../../../resources/control-flow/backend-logic/backend-query/sqlite-query.md) with the type set to *Update Query* and Query Name to **Delete Note**.
228228

229229
:::tip[Pro Tip]
230-
To refresh the page, simply add an [**Update App State Action**](../../../../resources/data-representation/app-state.md) Action with the Update Type set
230+
To refresh the page, simply add an [**Update App State Action**](../../../resources/data-representation/app-state.md) Action with the Update Type set
231231
to 'Rebuild Current Page'.
232232
:::
233233
Here's how you do it:

docs/ff-integrations/database/local-sql/sqlite/_category_.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)