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
[Cloud Functions](https://firebase.google.com/docs/functions) allows you to run backend code in response to events triggered by Firebase features and HTTPS requests. For example, you want to automatically send a welcome email to users when they sign up for your app. You can do this using a Cloud Function that triggers on Firebase Authentication's user creation event.
12
+
[**Cloud Functions**](https://firebase.google.com/docs/functions) allows you to run backend code in response to events triggered by Firebase features and HTTPS requests. For example, you want to automatically send a welcome email to users when they sign up for your app. You can do this using a Cloud Function that triggers on Firebase Authentication's user creation event.
13
13
14
14
We allow you to write and deploy Firebase Cloud Functions directly within the platform. With an integrated code editor, writing JavaScript cloud functions is quick and user-friendly. Each function has customizable boilerplate settings, including pre-configured essentials like memory, region, and timeout.
15
15
@@ -73,16 +73,18 @@ Few things to note here:
73
73
74
74
To create and deploy a *Cloud Function* :
75
75
76
-
1. Click on the **Cloud Functions** from the [*Navigation Menu*]
77
-
(/getting-started/ui-builder/navigation-menu) (left side of your screen).
78
-
5. Click **+ Add**. This will add the default newCloudFunction*.*
76
+
1. Click on the **Cloud Functions** from the
77
+
[**Navigation Menu**](../../../docs/intro/ff-ui/builder.md#navigation-menu) (left side of your
78
+
screen).
79
+
5. Click **+ Add**. This will add the default `newCloudFunction`.
79
80
8. Set the **Cloud Function Name**.
80
81
81
82
#### Boilerplate Settings
82
83
83
84
On the right side, you can configure the following Boilerplate Settings:
84
85
1.**Memory Allocation**: You can specify the amount of memory your function should have when
85
86
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.
87
+
86
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.
87
89
8.**Require Authentication**: Turn on this setting if you want users to be authenticated to execute this cloud function.
88
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.
@@ -96,6 +98,7 @@ by configuring the input and output.
96
98
97
99
1. To receive output from a Cloud Function, enable the **Return Value** and choose an
98
100
appropriate Type for the output, like 'String' for text. For this example, set it to *ImagePath* to get the URL of the generated logo.
101
+
99
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*.
100
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:
101
104
@@ -129,6 +132,7 @@ For a list, the function should return:
129
132
#### To deploy
130
133
1. Click the `[</>]` icon to view the boilerplate code; a popup will open with the updated
131
134
code, and then click **`</> Copy to Editor`**. **Tip**: To see if you are able to deploy the cloud function (before adding your own code), proceed directly with steps 8 and 9.
135
+
132
136
2. Inside the code editor, add the cloud function code. **Tip**: You can copy the boilerplate code
133
137
to [ChatGPT](https://chat.openai.com/) and ask it to write the desired code based on that.
2. Now click on **Custom Functions** from the [*Navigation Menu*](/getting-started/ui-builder/navigation-menu) (left side of your screen) and open the **Custom Files > main.dart**.
69
+
2. Now click on **Custom Functions** from the
70
+
[**Navigation Menu**](../../../docs/intro/ff-ui/builder.md#navigation-menu) and open the **Custom Files > main.dart**.
70
71
5. Determine where to place the code (i.e., **Initial Action** or **Final Action**), click the **+** button, and select the custom action.
On opening the project, you'll see the App Builder, which consists of four main sections: [Navigation Menu](#navigation-menu), [Toolbar](#toolbar), [Canvas](#canvas-area), and [Properties panel](#properties-panel).
13
+
On opening the project, you'll see the App Builder, which consists of four main sections:
14
+
[Navigation Menu](#navigation-menu), [Toolbar](#toolbar), [Canvas](#canvas-area), and [Properties panel](#properties-panel).
14
15
15
16

16
17
17
-
## Navigation Menu {#navigation-menu}
18
+
## Navigation Menu
18
19
19
20
The Navigation Menu, located on the left side of the builder, allows you to switch between various FlutterFlow features. These include designing the UI, managing databases, setting up API, adjusting app settings, adding integrations, and more.
20
21
@@ -36,14 +37,14 @@ Here is a list of all the features accessible from the navigation menu:
15.**Settings and Integrations**: Access app-related settings and integrations.
38
39
39
-
## ToolBar {#toolbar}
40
+
## ToolBar
40
41
41
42
From [ToolBar](toolbar), you can search for project resources, change canvas size, see project history, branching, optimization and enhancements, view-download code, and run your app.
42
43
43
-
## Canvas Area {#canvas-area}
44
+
## Canvas Area
44
45
45
46
In the [Canvas Area](canvas), you can see a preview of a device's screen and build your app page.
46
47
47
-
## Properties Panel {#properties-panel}
48
+
## Properties Panel
48
49
49
50
The Properties Panel lets you modify both the visual appearance and interactive behavior of UI elements on the canvas. It allows you to add [Actions](#), set up a [Backend Query](#), add [Animations](#) and more.
Copy file name to clipboardExpand all lines: docs/resources/control-flow/backend-logic/backend-query/backend-query.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,10 @@ We offer you the following types of Backend Queries that you can specify on any
36
36
37
37
## Change loading indicator
38
38
39
-
While the backend query is busy retrieving results, it shows the default *Project Theme Loading Indicator* (which you can change from [*Navigation menu*](/getting-started/ui-builder/navigation-menu)*> Theme Settings > Design System > Loading Indicator*.) However, if you want to replace this with a custom loading indicator in a specific backend query, follow the instructions below:
39
+
While the backend query is busy retrieving results, it shows the default *Project Theme Loading
Settings > Design System > Loading Indicator*.) However, if you want to replace this with a custom loading indicator in a specific backend query, follow the instructions below:
40
43
41
44
<div style={{
42
45
position: 'relative',
@@ -138,7 +141,7 @@ For example, an e-commerce app can cache product data, such as product descripti
138
141
Caching backend queries works for all [types of queries](/data-and-backend/backend-query#types-of-query).
139
142
:::
140
143
141
-
:::Tip[Single time Query]
144
+
:::tip[Single time Query]
142
145
For Firebase queries, enable Single Time Query if you want the query to fetch data only once. Otherwise, the query operates in real-time, updating automatically as soon as the data changes.
0 commit comments