You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FlutterFlow generates a complete Flutter codebase for you as you build apps in its platform. Part of this code includes custom classes that are designed to streamline common tasks and encapsulate reusable properties or logic.
41
41
@@ -78,7 +78,7 @@ When referencing a Component class in your code, FlutterFlow will automatically
When building custom widgets, you often need to style parts of the widget, such as setting colors. Instead of using hardcoded color values, you can directly access the **FlutterFlow Theme**. This theme provides consistent styling across your app and reflects colors set by you or your project developer.
84
84
@@ -130,15 +130,15 @@ class _CustomButtonState extends State<CustomButton> {
130
130
```
131
131
132
132
133
-
### Manipulating AppState from Custom Code
133
+
### Modifying AppState from Custom Code
134
134
135
-
In FlutterFlow, you can access or update AppState directly from the Action Flow Editor. However, certain scenarios may require you to access or modify AppState within custom code for more control over the operation flow. The FFAppState class also provides additional helper functions to manipulate AppState variables. Let’s look at some examples:
135
+
In FlutterFlow, you can access or update AppState directly from the Action Flow Editor. However, certain scenarios may require you to access or modify AppState within custom code for more control over the operation flow. The `FFAppState` class also provides additional helper functions to modify AppState values. Let’s look at some examples:
136
136
137
137
:::tip[Imports]
138
138
Ensure you import `import '../../flutter_flow/flutter_flow_util.dart';` when accessing `FFAppState` in custom code resources.
139
139
:::
140
140
141
-
-**Accessing AppState in Custom Code**
141
+
-**Get AppState value in Custom Code**
142
142
143
143
```js
144
144
@@ -217,7 +217,7 @@ final newProduct = ProductStruct(
217
217
218
218
```
219
219
220
-
#### Example 2: Accessing Properties of an Existing `ProductStruct` object
220
+
#### Example 2: Get Properties of an Existing `ProductStruct` object
221
221
222
222
If you have an existing `ProductStruct` object (e.g., retrieved from a list of products), you can access its properties or return specific values back to the calling Action.
223
223
@@ -229,7 +229,7 @@ This function retrieves and returns the product's name. The return type is `Stri
229
229
```js
230
230
// Function to return the product name from a ProductStruct instance
231
231
String?getProductName(ProductStructproduct) {
232
-
//Access and return the product name
232
+
//Get and return the product name
233
233
returnproduct.name;
234
234
}
235
235
```
@@ -345,3 +345,16 @@ Here’s a list of other Firebase Auth variables that can be referenced in Custo
345
345
346
346
- These variables make it easy to integrate Firebase Auth data into custom functionality, enhancing the user experience.
347
347
348
+
349
+
### Get Library Values in Custom Code
350
+
351
+
Similar to the `FFAppState` class, FlutterFlow generates an `FFLibraryValues` class, which is also an abstract class. This class provides access to the **[Library Values](../../resources/projects/libraries.md#library-values)** if the project is a Library.
352
+
353
+
To directly access the Library Values in custom code:
0 commit comments