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
Copy file name to clipboardExpand all lines: docs/ff-concepts/adding-customization/custom-code.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ While FlutterFlow provides a wide range of pre-built components and functionalit
14
14
times when you need to extend your app with custom logic or UI components that are not available out of the box.
15
15
This is where writing custom code comes into play.
16
16
17
-
There are a few different ways to make custom code accessible in FlutterFLow:
17
+
There are a few different ways to make custom code accessible in FlutterFlow:
18
18
19
19
***[Custom Functions](custom-functions.md):** Custom Dart functions that can be used to set Widget or Action properties.
20
20
***[Custom Actions](custom-actions.md):** Custom Dart functions that can be triggered by [Action Triggers](https://docs.flutterflow.io/resources/functions/action-triggers/) or used as nodes in an [Action Flow](https://docs.flutterflow.io/resources/functions/action-flow-editor#action-flow-editor). These are usually `async` functions and are able to import [custom package dependencies](#adding-a-pubspec-dependency).
@@ -522,4 +522,4 @@ If any project errors related to packages arise, they will be displayed in both
Copy file name to clipboardExpand all lines: docs/ff-concepts/design-system/design-system.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -836,7 +836,7 @@ If you prefer watching a video tutorial, here is the guide for you:
836
836
837
837
Creating a theme for widgets ensures that your app looks consistent and has a cohesive design. The Theme widgets can be reused, making it easy to update the styles of your app. If you decide to change any property of the widget, such as color scheme or fonts, you can update the theme widget instead of going through every widget individually. This can save a lot of time and effort, especially in larger projects.
838
838
839
-
For example, creating theme widgets for different types of buttons such as 'primary_button', 'secondary_button', and 'tertairy_button' with specific attributes like width, color, icon, border radius, and padding. Then, these widgets can be directly added to a page or applied to an existing widget.
839
+
For example, creating theme widgets for different types of buttons such as 'primary_button', 'secondary_button', and 'tertiary_button' with specific attributes like width, color, icon, border radius, and padding. Then, these widgets can be directly added to a page or applied to an existing widget.
Copy file name to clipboardExpand all lines: docs/generated-code/ff-app-state.md
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,15 +34,14 @@ class FFAppState extends ChangeNotifier {
34
34
notifyListeners();
35
35
}
36
36
37
-
// App State variable of primitive type with a getter and setter
38
-
bool _enableDarkMode =false;
37
+
// App State variable of primitive type with a getter and setter
38
+
bool _enableDarkMode =false;
39
39
40
-
bool get enableDarkMode=> _enableDarkMode;
40
+
bool get enableDarkMode=> _enableDarkMode;
41
41
42
-
setenableDarkMode(boolvalue) {
42
+
setenableDarkMode(boolvalue) {
43
43
_enableDarkMode = value;
44
-
}
45
-
44
+
}
46
45
}
47
46
```
48
47
@@ -52,7 +51,7 @@ The `_enableDarkMode` is an App State variable created by developer that creates
52
51
When updating an `AppState` variable from the Action Flow Editor, you will be presented with several **[update type](../resources/data-representation/app-state.md#update-type)** options such as **Rebuild All Pages**, **Rebuild Current Page**, and **No Rebuild** in the Action Settings. Let's see how the generated code changes when these options are selected.
53
52
54
53
### Rebuild Current Page
55
-
When a developer chooses to update App State with the update type set to **Rebuild Current Page**, the corresponding `setter` is called. Immediately after, `setState((){});` is invoked, which updates only the current page.
54
+
When a developer chooses to update App State with the update type set to **Rebuild Current Page**, the corresponding `setter` is called. Immediately after, `setState((){});` is invoked, which updates only the current page.
56
55
57
56
Here's an example of the generated code when we update the App State `enableDarkMode` in the `onInitialization` action trigger of the `ProductListPage`.
58
57
@@ -90,7 +89,7 @@ Only the setter is called with no setState or update method invoked afterward. T
90
89
When you add an [**Update App State**](../resources/data-representation/app-state.md#update-app-state-action) action via the Action Flow Editor, the corresponding pages will include this line within the build method:
91
90
92
91
```js
93
-
@override
92
+
@override
94
93
Widget build(BuildContextcontext) {
95
94
context.watch<FFAppState>();
96
95
...
@@ -155,4 +154,4 @@ These functions are automatically generated to provide a convenient and consiste
155
154
156
155
:::info[How to create App State variables]
157
156
To learn more about creating and using App State variables in FlutterFlow's UI, check out the[ **App State**](../resources/data-representation/app-state.md) guide.
0 commit comments