Skip to content

Commit fa43a5e

Browse files
authored
Merge pull request #401 from FlutterFlow/fix/faq-app-state-variable-type
Add FAQ to clarify variable type limitations in App State
2 parents b2dd191 + 5772dba commit fa43a5e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/resources/data-representation/app-state.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,17 @@ Here's a quick guide to updating the app state variable. We need to add an actio
114114
</iframe>
115115
</div>
116116

117+
## FAQs
118+
119+
<details>
120+
<summary>
121+
Why are some variable types not available in App State?
122+
</summary>
123+
<p>
124+
Certain variable types, e.g., **Firestore Documents** and **Supabase Row**, can be used in Page State or Component State, but not in App State. This is because App State variables are designed to be global, meaning they stay in memory throughout the app. When App State variables are marked as persisted, the variable’s value is saved to the device’s local storage.
125+
126+
Storing large or complex data types like documents in App State could lead to **performance or size issues**, especially on lower-end devices. For this reason, FlutterFlow limits App State to lightweight types, while Page/Component State allows for more flexibility since their scope is smaller and temporary.
127+
128+
If you need to work with such data types, it's recommended to store them in Page or Component state instead.
129+
</p>
130+
</details>

0 commit comments

Comments
 (0)