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/animations/widget_animations.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
@@ -208,7 +208,7 @@ If you notice carefully, the items appear in a staggered fashion. This can be ac
208
208
209
209
Select the item in the list and add the Slide animation.
210
210
211
-
In the Delay property, open the variable menu and add a [code expression](../../resources/control-flow/functions/utility-functions.md#code-expressions) to calculate the delay value based on the item's index. For this example, we use the formula `[index] * 100`, where `index` represents the position of the item, and `100` is the delay in milliseconds. This means the first item will slide in after 100 ms, the second after 200 ms, and so on, creating a staggered animation effect.
211
+
In the Delay property, open the variable menu and add a [inline function](../../resources/control-flow/functions/utility-functions.md#inline-function) to calculate the delay value based on the item's index. For this example, we use the formula `[index] * 100`, where `index` represents the position of the item, and `100` is the delay in milliseconds. This means the first item will slide in after 100 ms, the second after 200 ms, and so on, creating a staggered animation effect.
Copy file name to clipboardExpand all lines: docs/ff-integrations/payments/razorpay.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
@@ -137,7 +137,7 @@ Follow the steps below to add this action:
137
137
3. Search and select the **Razorpay Payment** (under *Integrations*) action.
138
138
4. Enter or use a variable for specifying the total amount under the **Amount** section. **Note** that the value should be specified in the currency's smallest unit.
139
139
- For example, *$24.99* should be passed as *2499* (as a round-off integer; otherwise, it would be automatically rounded); similarly, for an amount of ₹120.00, 12000 should be passed.
140
-
- Most probably, you'll specify this value from a variable. If you do so, you might need this [code expression](../../resources/control-flow/functions/utility-functions.md#code-expressions) to convert the total amount in the required format: `amount.toStringAsFixed(2).replaceAll(".", "");`
140
+
- Most probably, you'll specify this value from a variable. If you do so, you might need this [inline function](../../resources/control-flow/functions/utility-functions.md#inline-function) to convert the total amount in the required format: `amount.toStringAsFixed(2).replaceAll(".", "");`
141
141
5. Enter the **Currency Code** to be used for the amount, for example, *INR*, *USD*, *EUR*, or *BRL*. Make sure you enter a valid currency code; otherwise, the transaction won't go through. Download the complete [list of supported currencies](https://razorpay.com/docs/build/browser/assets/images/international-currency-list.xlsx).
Copy file name to clipboardExpand all lines: docs/resources/control-flow/backend-logic/api/soap-api.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
@@ -309,7 +309,7 @@ You can now proceed to display the country list in *HomePage*. Here are the step
309
309
<p></p>
310
310
311
311
4. On ListView, [generate dynamic children](../../../ui/widgets/composing-widgets/generate-dynamic-children.md) using the page state variable.
312
-
5. The page state variable stores the country name and code as a single string (e.g., Australia - AT). To display the name and code separately in a *ListTile*, we can use a [code expression](../../../control-flow/functions/utility-functions.md#code-expressions). To display the country name, we can use `var1.split("-")[1].trim()`, where `var1` is the current item in the list. To display the country code, we can use the same expression and replace `[1]` with `[0]`.
312
+
5. The page state variable stores the country name and code as a single string (e.g., Australia - AT). To display the name and code separately in a *ListTile*, we can use a [inline function](../../../control-flow/functions/utility-functions.md#inline-function). To display the country name, we can use `var1.split("-")[1].trim()`, where `var1` is the current item in the list. To display the country code, we can use the same expression and replace `[1]` with `[0]`.
Copy file name to clipboardExpand all lines: docs/resources/control-flow/backend-logic/api/streaming-api.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
@@ -356,7 +356,7 @@ id: 2
356
356
```
357
357
The Server Sent Event Data JSON will be `null` because the data cannot be parsed as JSON.
358
358
359
-
You can fix this by using the following expression inside the [Code Expression](../../../control-flow/functions/utility-functions.md#code-expressions) to handle the `null` case:
359
+
You can fix this by using the following expression inside the [Inline Function](../../../control-flow/functions/utility-functions.md#inline-function) to handle the `null` case:
Copy file name to clipboardExpand all lines: docs/resources/control-flow/functions/utility-functions.md
+15-32Lines changed: 15 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,7 @@ FlutterFlow has the following built-in functions:
21
21
***Combine Text:** A built-in function that lets you concatenate strings, making it easy to join
22
22
multiple text elements together seamlessly.
23
23
24
-
***Code Expression:** This feature allows you to perform simple calculations and data
25
-
manipulations
26
-
quickly and efficiently.
24
+
***Inline Function:** This feature allows you to perform simple calculations and data manipulations quickly and efficiently.
27
25
28
26
29
27
@@ -87,34 +85,22 @@ together, with the same text style applied to all of them. If you need to combin
87
85
values with different text styles for each, consider using the **[RichText](../../ui/widgets/basic-widgets/text.md#richtext-widget)** widget.
88
86
:::
89
87
90
-
## Code Expressions
88
+
## Inline Function
89
+
Often times, you may need to quickly format data, convert a data type from one form to another, or perform a simple calculation before setting the variable to a data source, such as a widget value source.
91
90
92
-
Oftentimes, you may need to quickly format data, convert a data type from one form to another,
93
-
or perform a simple calculation before setting the variable to a data source, such as a widget
94
-
value source.
91
+
Inline Function is a piece of code that combines operators, variables, and/or values to produce a result. It can be used for arithmetic and logical operations, among other tasks.
95
92
96
-
**Code Expression** built-in functions can help with
97
-
these tasks. A code expression is a piece of code that combines operators, variables, and/or values
98
-
to produce a result. It can be used for arithmetic and logical operations, among other tasks.
93
+
To add inline function, open the Set from Variable dialog wherever it's possible to set a dynamic value and choose the values that will be part of the inline function.
99
94
100
-
To perform a code expression, open the Variable Setter dialog wherever it's possible to set a
101
-
dynamic value and choose the values that will be part of the code expression.
95
+
For example, we may want to quickly calculate the discount amount of a product where the discount is 18% of the MRP of the product. The expression would be `cost - (cost * discount)`.
102
96
103
-
For example, we may want to quickly calculate the discount amount of a product where the discount is
104
-
18% of the MRP of the product.
97
+
**Precedence of operations**
105
98
106
-
The expression would be `cost - (cost * discount)`.
99
+
Inline Function for math operations follow typical precedence (e.g., multiplication/division before addition/subtraction), but parentheses can change the order.
107
100
108
-
:::warning[Precedence of operations]
109
-
Code expressions for math operations follow typical precedence (e.g., multiplication/division before
110
-
addition/subtraction), but parentheses can change the order.
111
-
:::
112
-
113
-
In this case, the variables we need are `cost` and `discount`.
101
+
In this case, the variables we need are `cost` and `discount`.
114
102
115
-
So, we create two arguments in the **Code Expression** dialog where they hold the value of `cost`
116
-
and `discount`, assign the data type for each of the arguments, and define the return type of the
117
-
final value. In this case, the return type is a `double` since it holds the **subtotal** amount.
103
+
So, we create two arguments in the **Inline Function** dialog where they hold the value of `cost` and `discount`, assign the data type for each of the arguments, and define the return type of the final value. In this case, the return type is a `double` since it holds the **subtotal** amount.
118
104
119
105
<div style={{
120
106
position: 'relative',
@@ -123,7 +109,7 @@ final value. In this case, the return type is a `double` since it holds the **su
@@ -142,10 +128,9 @@ final value. In this case, the return type is a `double` since it holds the **su
142
128
</iframe>
143
129
</div>
144
130
145
-
Now you can write the code expression in the **Expression** field and click on **Check Errors** to
146
-
see if the expression is valid. If it is valid, you will see the generated code for the same.
131
+
Now you can write the inline function in the **Expression** field and click on **Check Errors** to see if the expression is valid. If it is valid, you will see the generated code for the same.
147
132
148
-
The arguments in a Code Expression can take the following properties:
133
+
The arguments in a Inline Function can take the following properties:
149
134
150
135
| DataType | Supports Nullable | Supports List |
151
136
|----------|-------------------|---------------|
@@ -172,12 +157,10 @@ Here are some common expressions you can use for your business logic:
172
157
173
158
174
159
175
-
176
-
177
160
## Custom Functions
178
161
179
-
You can also use custom functions to handle slightly more complex calculations or to process a wider range of data types that are not supported in Code Expression.
162
+
You can also use custom functions to handle slightly more complex calculations or to process a wider range of data types that are not supported in Inline Function.
180
163
181
164
:::info
182
165
Learn more about [**Custom Functions**](../../../ff-concepts/adding-customization/custom-functions.md).
Copy file name to clipboardExpand all lines: docs/resources/control-flow/user-interactivity/forms/form-widgets/dropdown.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
@@ -244,7 +244,7 @@ You might need to disable a dropdown when certain conditions are not yet met or
244
244
To disable the dropdown:
245
245
246
246
1. Select the **DropDown** widget, move to the **Properties Panel > DropDown Search >** enable **Disable Dropdown** option.
247
-
2. Click on **Unset** and select the source that returns the boolean value (i.e., True or False), such as boolean variable, [Conditions](../../../../../resources/functions/conditional-logic), [Code Expression](../../../../../resources/functions/utility#code-expressions).
247
+
2. Click on **Unset** and select the source that returns the boolean value (i.e., True or False), such as boolean variable, [Conditions](../../../../../resources/functions/conditional-logic), [Inline Function](../../../../../resources/control-flow/functions/utility-functions.md#inline-function).
4. Now, inside the *StickyHeader**Content* section, add the **ListView** with a **Container**
167
167
inside to display the list of matching contacts.
168
168
169
-
1. On this ListView, generate dynamic children from a variable that holds all the contacts. But while doing so, filter the list and extract only matching contacts using [Code expression](../../../../resources/control-flow/functions/utility-functions.md#code-expressions).
169
+
1. On this ListView, generate dynamic children from a variable that holds all the contacts. But while doing so, filter the list and extract only matching contacts using [Inline Function](../../../../resources/control-flow/functions/utility-functions.md#inline-function).
170
170
2. Now you can display the contact's details, such as name, inside the UI.
0 commit comments