Skip to content

Commit 6be133c

Browse files
authored
More cleanups (#71)
* Add Firebase Setup links * Fix Navigation Menu links * Fix pages & hide todos * Update links * Fix dead links * More cleanups * Fix incorrect numberings
1 parent 9361f24 commit 6be133c

File tree

121 files changed

+943
-908
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+943
-908
lines changed

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

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ The Cloud Function takes input from a TextField widget and initiates an API call
3232
Here are the step-by-step instructions to build such an example:
3333

3434
1. [Add page state variables](#1-add-page-state-variables)
35-
5. [Build a page](#2-build-a-page)
36-
8. [Create and deploy Cloud Function](#3-create-and-deploy-cloud-function)
37-
11. [Optional: Add package](#4-optional-add-package)
38-
14. [Trigger Cloud Function](#5-trigger-cloud-function)
39-
17. [Optional: Use Cloud Function result](#6-optional-use-cloud-function-result)
35+
2. [Build a page](#2-build-a-page)
36+
3. [Create and deploy Cloud Function](#3-create-and-deploy-cloud-function)
37+
4. [Optional: Add package](#4-optional-add-package)
38+
5. [Trigger Cloud Function](#5-trigger-cloud-function)
39+
6. [Optional: Use Cloud Function result](#6-optional-use-cloud-function-result)
4040

4141
:::info[Before you Begin]
4242

@@ -47,22 +47,23 @@ Here are the step-by-step instructions to build such an example:
4747

4848
### 1. Add page state variables
4949

50-
For this example, you'll need to set up two [page state variables](/data-and-backend/state-management/page-state#1.-creating-page-state-variable):
50+
For this example, you'll need to set up two
51+
[Page State variables](../../resources/ui-building-blocks/pages/page-lifecycle.md#creating-a-page-state):
5152

5253
1. **generatingImage (*****Type: Boolean*****)**: This is used to control the visibility of a
5354
loading indicator during the logo creation process. Its value is set to *True* before initiating the API call and switched to *False* once the logo generation is complete.
54-
5. **logoImage (*****Type: ImagePath*****)**: This is used to hold the generated logo image. After a successful API call, the retrieved image URL is stored here, allowing the logo to be displayed in the Image widget.
55+
2. **logoImage (*****Type: ImagePath*****)**: This is used to hold the generated logo image. After a successful API call, the retrieved image URL is stored here, allowing the logo to be displayed in the Image widget.
5556

5657
<p></p>
57-
![img_6.png](imgs%2Fimg_6.png)
58+
![img_6.png](imgs/img_6.png)
5859

5960
### 2. Build a page
6061

6162
Let's add a page that allows users to enter the prompt. To speed up, you can add a page from the [template](/getting-started/adding-new-page#add-page) or use [AI Page Gen](/getting-started/adding-new-page#ai-gen-page). Here is the page added using AI Page Gen, and after some modification, it looks the below:
6263

6364
Also, see how to [build a page layout](/widgets-and-components/ui-and-layout-101) if you want to build a page from scratch.
6465

65-
![img_7.png](imgs%2Fimg_7.png)
66+
![img_7.png](imgs/img_7.png)
6667

6768
Few things to note here:
6869

@@ -76,20 +77,20 @@ To create and deploy a *Cloud Function* :
7677
1. Click on the **Cloud Functions** from the
7778
[**Navigation Menu**](../../../docs/intro/ff-ui/builder.md#navigation-menu) (left side of your
7879
screen).
79-
5. Click **+ Add**. This will add the default `newCloudFunction`.
80-
8. Set the **Cloud Function Name**.
80+
2. Click **+ Add**. This will add the default `newCloudFunction`.
81+
3. Set the **Cloud Function Name**.
8182

8283
#### Boilerplate Settings
8384

8485
On the right side, you can configure the following Boilerplate Settings:
8586
1. **Memory Allocation**: You can specify the amount of memory your function should have when
8687
it's executed based on its complexity and needs. This setting is crucial as it influences the function's performance and the cost of running it. More memory can enhance performance for intensive tasks but also increase costs.
8788

88-
5. **Timeout (s)**: This refers to the maximum amount of time, in seconds, that a function is allowed to run before it is automatically terminated. If your function takes longer to execute, increasing the timeout setting may be necessary. However, be aware that longer timeouts can incur higher costs since billing is based on execution time.
89-
8. **Require Authentication**: Turn on this setting if you want users to be authenticated to execute this cloud function.
90-
11. **Cloud Function Region**: This determines the geographical location of the servers where your functions are hosted and executed. Ideally, you should keep this same as your *Default GCP resource location* and the Cloud Function Region specified in the Firebase Advanced Settings.
89+
2. **Timeout (s)**: This refers to the maximum amount of time, in seconds, that a function is allowed to run before it is automatically terminated. If your function takes longer to execute, increasing the timeout setting may be necessary. However, be aware that longer timeouts can incur higher costs since billing is based on execution time.
90+
3. **Require Authentication**: Turn on this setting if you want users to be authenticated to execute this cloud function.
91+
4. **Cloud Function Region**: This determines the geographical location of the servers where your functions are hosted and executed. Ideally, you should keep this same as your *Default GCP resource location* and the Cloud Function Region specified in the Firebase Advanced Settings.
9192

92-
![img_8.png](imgs%2Fimg_8.png)
93+
![img_8.png](imgs/img_8.png)
9394

9495
#### Configuring Input & Output
9596

@@ -99,8 +100,9 @@ by configuring the input and output.
99100
1. To receive output from a Cloud Function, enable the **Return Value** and choose an
100101
appropriate Type for the output, like 'String' for text. For this example, set it to *ImagePath* to get the URL of the generated logo.
101102

102-
5. To input data: Click **+ Add parameters**. **Name** the parameter, select its **Type**, choose single or multiple items (**Is List** option), and uncheck **Nullable** if the value can be null. For this example, add a parameter 'prompt' with *Type* set to *String*.
103-
8. When using [Custom Data Types](/data-and-backend/custom-data-types), Cloud Function expects JSON, matching each field in the Data Type to a key-value pair in the JSON. If the Data Type is a list, the function expects a list of JSONs. For example, for a custom data type named 'Person' with fields 'Name' and 'Age,' the function should return:
103+
2. To input data: Click **+ Add parameters**. **Name** the parameter, select its **Type**, choose single or multiple items (**Is List** option), and uncheck **Nullable** if the value can be null. For this example, add a parameter 'prompt' with *Type* set to *String*.
104+
3. When using [Custom Data Types](../../resources/data-representation/custom-data-types.md),
105+
Cloud Function expects JSON, matching each field in the Data Type to a key-value pair in the JSON. If the Data Type is a list, the function expects a list of JSONs. For example, for a custom data type named 'Person' with fields 'Name' and 'Age,' the function should return:
104106

105107
```
106108
//JSON:
@@ -224,7 +226,7 @@ Your cloud function may require third-party packages to work. You can include an
224226

225227
To add a dependency, open the `package.json` file and specify your package in the `dependencies` section.
226228

227-
![img_9.png](imgs%2Fimg_9.png)
229+
![img_9.png](imgs/img_9.png)
228230

229231
### 5. Trigger Cloud Function
230232

@@ -250,7 +252,7 @@ com/embed/0c4306c1951a4d9099aa96324c7561af?sid=69709110-ad60-4e98-bf53-36a50a99e
250252
<details>
251253
<summary>I am getting Cloud Function Deployment Errors</summary>
252254

253-
![img_10.png](imgs%2Fimg_10.png)
255+
![img_10.png](imgs/img_10.png)
254256

255257
<p></p>
256258

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

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ This
1616
is where writing custom code comes into play. We provide the following features to accommodate
1717
these needs:
1818

19-
* **Custom Functions:** Write custom Dart functions to perform specific tasks or calculations.
20-
* **Custom Actions:** Implement custom actions that can be triggered by user interactions or
19+
* **[Custom Functions](custom-functions.md):** Write custom Dart functions to perform specific tasks or
20+
calculations.
21+
* **[Custom Actions](custom-actions.md):** Implement custom actions that can be triggered by user
22+
interactions or
2123
other action triggers.
22-
* **Custom Widgets:** Create custom Flutter widgets to achieve unique UI designs or behaviors.
23-
* **Custom Files:** Ability to edit some parts of the `main.dart` file.
24+
* **[Custom Widgets](custom-widgets.md):** Create custom Flutter widgets to achieve unique UI designs or
25+
behaviors.
26+
* **[Custom Files:](custom-files.md)** Ability to edit some parts of the `main.dart` file.
2427

2528
:::tip[Why Write Custom Code?]
2629

@@ -38,7 +41,7 @@ There are several properties and settings that are common to each type of custom
3841
FlutterFlow. Most of these common properties are highlighted in the diagram below. For more
3942
information about some of these properties, see the details provided below.
4043

41-
![custom-code-common.png](imgs%2Fcustom-code-common.png)
44+
![custom-code-common.png](imgs/custom-code-common.png)
4245

4346
### Code Copilot
4447

@@ -86,7 +89,7 @@ compilation errors. To do so, click the **Compile Code** button.
8689

8790

8891
<figure>
89-
![compile-errors.png](imgs%2Fcompile-errors.png)
92+
![compile-errors.png](imgs/compile-errors.png)
9093
<figcaption class="centered-caption">How to recognize compile time errors</figcaption>
9194
</figure>
9295

@@ -95,7 +98,7 @@ compilation errors. To do so, click the **Compile Code** button.
9598
The code analyzer is available in all your custom code snippets and ensures the quality and
9699
correctness of your custom code. It automatically checks your Dart code for errors and warnings,
97100
providing real-time feedback as you write.
98-
![code-analyzer.png](imgs%2Fcode-analyzer.png)
101+
![code-analyzer.png](imgs/code-analyzer.png)
99102
When there is a compilation error, the code analyzer will stop running and display the errors caught
100103
by the compiler. Once fixed, save the code and rerun using the Compile Code button. The code analyzer
101104
should then be reconnected. You can also manually reconnect it if needed.
@@ -104,7 +107,7 @@ should then be reconnected. You can also manually reconnect it if needed.
104107

105108
When creating a new custom code snippet (actions, widgets, or functions) in FlutterFlow, some fundamental imports will be automatically added for you. These imports cannot be modified by the developer. Custom Functions do not allow adding any custom imports, but you can add custom imports in Custom Actions and Widgets after the line **"Do not remove or modify the code above"**.
106109

107-
![automatic-imports.png](imgs%2Fautomatic-imports.png)
110+
![automatic-imports.png](imgs/automatic-imports.png)
108111

109112
### Custom Code Settings
110113

@@ -122,7 +125,7 @@ compile process.
122125

123126
This option is only available for Custom Widgets and Custom Actions.
124127
:::
125-
![action-settings.png](imgs%2Faction-settings.png)
128+
![action-settings.png](imgs/action-settings.png)
126129

127130
#### Include BuildContext
128131

@@ -144,7 +147,7 @@ scenarios within your application.
144147

145148
Here's an example of an action that takes 2 arguments: `cartItems` that is a `List of
146149
ItemsStruct` and `productId` that is a String.
147-
![action-arguments.png](imgs%2Faction-arguments.png)
150+
![action-arguments.png](imgs/action-arguments.png)
148151

149152
:::tip[Generated Code for custom data types]
150153
When you define a custom data type in FlutterFlow, the generated code will refer to the type
@@ -166,7 +169,7 @@ occurs.
166169
In the following example, we have a Custom Action that takes an `onError(searchKeyword)` callback
167170
action with an Action Parameter `searchKeyword`. This means that the custom action will provide this search keyword back to the callback action when it calls it.
168171

169-
![explain-callback-action.png](imgs%2Fexplain-callback-action.png)
172+
![explain-callback-action.png](imgs/explain-callback-action.png)
170173

171174
##### Provide an Action to Callback Action
172175

@@ -212,7 +215,7 @@ return a value at the moment.
212215

213216
Here's an example of an Action that returns a _nullable_ integer.
214217

215-
![return-value-actions.png](imgs%2Freturn-value-actions.png)
218+
![return-value-actions.png](imgs/return-value-actions.png)
216219

217220
#### Adding a Pub Dependency
218221

@@ -224,8 +227,8 @@ If you plan to use a dependency from [*pub.dev*](https://pub.dev/) into a custom
224227
you must go through the following steps:
225228

226229
1. [Choosing dependency](#1-choosing-dependency)
227-
5. [Copying dependency/package name](#2-copying-dependency-name)
228-
8. [Copying import statement](#3-copying-import-statement)
230+
2. [Copying dependency/package name](#2-copying-dependency-name)
231+
3. [Copying import statement](#3-copying-import-statement)
229232

230233
##### 1. Choosing dependency
231234

@@ -252,7 +255,7 @@ one.
252255

253256
<p></p>
254257

255-
![Dependency-score.png](imgs%2FDependency-score.png)
258+
![Dependency-score.png](imgs/Dependency-score.png)
256259

257260
##### 2. Copying dependency name
258261

@@ -261,7 +264,7 @@ the **Copy to Clipboard** icon.
261264

262265
<p></p>
263266

264-
![img.png](imgs%2Fimg.png)
267+
![img.png](imgs/img.png)
265268

266269
<p></p>
267270

@@ -273,7 +276,7 @@ name and version of all the additional dependencies to specify in the code edito
273276
You can check if the current dependency has any additional dependencies inside the '*Dependencies'*
274277
section at the bottom right side.
275278

276-
![img_1.png](imgs%2Fimg_1.png)
279+
![img_1.png](imgs/img_1.png)
277280

278281
##### 3. Copying import statement
279282

@@ -283,7 +286,7 @@ action, place this statement at the beginning of the code editor.
283286
Open the dependency page and select the installing tab; under the Import it section, you'll find
284287
the import statement. To copy, click the **Copy to Clipboard** icon.
285288

286-
![img_2.png](imgs%2Fimg_2.png)
289+
![img_2.png](imgs/img_2.png)
287290

288291

289292

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ keywords: [FlutterFlow, Custom Files, Customizations, Flutter, Dart, Pub.dev]
1111

1212
We allow you to add a custom code directly into the `main.dart` file of your app. This means that you can easily implement specific functionalities and customize your app as per your requirements without downloading the entire project and manually modifying the file.
1313

14-
By default, the file you want to edit is in 'read-only' mode. However, using our editor, you can add a code snippet in the form of [custom actions](/customizing-your-app/custom-functions/custom-actions).
14+
By default, the file you want to edit is in 'read-only' mode. However, using our editor, you can
15+
add a code snippet in the form of [Custom Actions](custom-actions.md).
1516

1617
:::warning[Please note]
1718
You can only add custom actions that have no arguments (including *BuildContext*).
@@ -29,14 +30,15 @@ Let's see an example of how you can add a code in **main.dart** file to change t
2930
color for the mobile app. Here's how it looks:
3031

3132
<figure>
32-
![img_3.png](imgs%2Fimg_3.png)
33+
![img_3.png](imgs/img_3.png)
3334
<figcaption class="centered-caption">Changing the status bar color for the mobile device</figcaption>
3435
</figure>
3536

3637
To do so, you can edit *main.dart* file by following the steps below:
3738

38-
1. Create a [custom action](/customizing-your-app/custom-functions/custom-actions#adding-custom
39-
-action) for the code you want to include in a *main.dart* file. For this example, here's code in a custom action named 'setStatusbarColor'.
39+
1. Create a [Custom Action](custom-actions.md#custom-actions) for the code you want to include in a `main.
40+
dart` file. For this
41+
example, here's code in a custom action named 'setStatusbarColor'.
4042

4143
```dart
4244
// Automatic FlutterFlow imports
@@ -66,10 +68,10 @@ Future setStatusbarColor() async {
6668
}
6769
```
6870

69-
2. Now click on **Custom Functions** from the
71+
1. Now click on **Custom Functions** from the
7072
[**Navigation Menu**](../../../docs/intro/ff-ui/builder.md#navigation-menu) and open the **Custom Files > main.dart**.
71-
5. Determine where to place the code (i.e., **Initial Action** or **Final Action**), click the **+** button, and select the custom action.
72-
8. Click **Save**.
73+
2. Determine where to place the code (i.e., **Initial Action** or **Final Action**), click the **+** button, and select the custom action.
74+
3. Click **Save**.
7375

7476
<div class="video-container"><iframe src="https://www.loom.
7577
com/embed/e8e12fad4fce42bba29080f83a1f4b74?sid=3f01f3b7-38f0-4f01-8bec-6442db66fe07" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
@@ -83,7 +85,8 @@ Let's see some more examples of adding code to the *main.dart* file to solidify
8385

8486
You might want to lock the device orientation in portrait or landscape mode to prevent it from rotating the screen automatically when the user tilts or rotates the device. This is useful in scenarios where the layout of the app is designed to work only in one specific orientation or when you want to ensure that the app is always displayed in a consistent manner.
8587

86-
To set the device orientation in landscape-only mode, [create a custom action](/customizing-your-app/custom-functions/custom-actions#adding-custom-action) with the following code and [add it to a *main.dart*](/customizing-your-app/custom-functions/custom-files#edit-main.dart) file.
88+
To set the device orientation in landscape-only mode, [create a custom action](custom-actions.md) with the
89+
following code and [add it to a `main.dart`](#edit-maindart) file.
8790

8891
```dart
8992
// Automatic FlutterFlow imports
@@ -108,7 +111,7 @@ Future setLandscapeMode() async {
108111
```
109112

110113
<figure>
111-
![img_4.png](imgs%2Fimg_4.png)
114+
![img_4.png](imgs/img_4.png)
112115
<figcaption class="centered-caption">Edit main.dart file to lock the device orientation</figcaption>
113116
</figure>
114117

@@ -117,7 +120,7 @@ Future setLandscapeMode() async {
117120

118121
If you want to ensure that your app appropriately manages its lifecycle and handles any necessary actions when it transitions between different states, such as 'resumed' and 'paused,' you can add the `AppLifecycleObserver` in the *main.dart* file.
119122

120-
To do so, [create a custom action](/customizing-your-app/custom-functions/custom-actions#adding-custom-action) with the following code and [add it to a *main.dart*](/customizing-your-app/custom-functions/custom-files#edit-main.dart) file.
123+
To do so, [create a custom action](custom-actions.md) with the following code and [add it to a `main.dart`](#edit-maindart) file.
121124

122125

123126
```dart
@@ -150,6 +153,6 @@ print('App is in background');
150153
}
151154
```
152155
<figure>
153-
![img_5.png](imgs%2Fimg_5.png)
156+
![img_5.png](imgs/img_5.png)
154157
<figcaption class="centered-caption">Edit main.dart file to get lifecycle callback</figcaption>
155158
</figure>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ variable `userRating`.
161161

162162
FlutterFlow also allows you to view your custom widget once it is successfully compiled.
163163

164-
![preview-widget.png](imgs%2Fpreview-widget.png)
164+
![preview-widget.png](imgs/preview-widget.png)
165165

166166
:::tip[LOOKING for other CUSTOM action properties?]
167167
To learn more about Custom Widget settings, such as the

docs/ff-concepts/animations/animations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ keywords: [FlutterFlow, Animations, Concepts]
99

1010
Enhancing your app with animations significantly improves the user experience, making it more engaging and intuitive. In FlutterFlow, you have several options to add animations to your app:
1111

12-
- [**Widget Animations**](widget-animations): Add animation effects to an entire widget.
13-
- [**Implicit Animations**](implicit-animations): Animate changes in specific widget properties, such as the height of a Container.
14-
- [**Hero Animations**](hero-animations): Animate a widget that transitions smoothly between screens, also known as shared element transitions.
15-
- [**Page Transition Animations**](page-transition-animations): Specify transitions between pages within your app.
12+
- [**Widget Animations**](widget_animations.md): Add animation effects to an entire widget.
13+
- [**Implicit Animations**](implicit_animations.md): Animate changes in specific widget properties, such as the height of a Container.
14+
- [**Hero Animations**](hero_animations.md): Animate a widget that transitions smoothly between screens, also known as shared element transitions.
15+
- [**Page Transition Animations**](page_transitions.md): Specify transitions between pages within your app.
1616
- **Import Animations**: Import animations you've created using other tools such [lottiefiles](import-animations/lottie-animation) and [Rive](import-animations/rive-animation).
1717

1818

docs/ff-concepts/animations/hero_animations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The steps to build such an example are as follows:
7979
</div>
8080
<p></p>
8181

82-
3. Add [navigation action](../../resources/ui-building-blocks/pages/navigation#navigate-to-action) from page 1 to page 2.
82+
3. Add [navigation action](../../resources/ui-building-blocks/pages/navigation-.md#navigate-to-action) from page 1 to page 2.
8383

8484

8585

@@ -176,7 +176,7 @@ The steps to add hero animation on a component are as follows:
176176
</div>
177177
<p></p>
178178

179-
3. Add [navigation action](#) from page 1 to page 2.
179+
3. Add [navigation action](../../ff-concepts/navigation-routing/page-navigation.md#navigate-to-action) from page 1 to page 2.
180180

181181
## FAQs
182182

0 commit comments

Comments
 (0)