Skip to content

Commit 17bf2de

Browse files
committed
Merge branch 'refs/heads/main' into pooja/deeplink
2 parents a600c10 + 778a7e8 commit 17bf2de

File tree

8 files changed

+58
-138
lines changed

8 files changed

+58
-138
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,22 @@ Here's an example of an Action that returns a _nullable_ integer.
243243

244244
![return-value-actions.png](imgs/return-value-actions.png)
245245

246+
## Description
247+
248+
You can add a [**Description**](../../intro/ff-ui/resource-hierarchy.md#resource-description) note on Custom Functions and Custom Actions to briefly explain their purpose, usage, or important details. This helps clarify what the function or action is intended for, making your project more understandable and maintainable—especially in libraries and collaborative environments.
249+
250+
![adding-description-on-custom-function-action.avif](imgs/adding-description-on-custom-function-action.avif)
251+
252+
You can view these descriptions as tooltips by hovering over the green note icon when selecting a Custom Function or Custom Action.
253+
254+
![view-description-custom-function-and-custom-action](imgs/view-description-custom-function-and-custom-action.avif)
255+
256+
:::tip
257+
In the generated code, descriptions are added as comments before the function definition, and they also appear in the custom code editor.
258+
259+
![description-in-custom-code](imgs/description-in-custom-code.avif)
260+
:::
261+
246262
## Adding a Pubspec Dependency
247263
To utilize community-built Flutter solutions in your FlutterFlow projects, you can add a "pubspec dependency". The **pubspec file** is the configuration file in Flutter projects that lists external packages or libraries, along with other project configurations.
248264

Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/resources/control-flow/functions/loops.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,46 @@ sidebar_position: 5
77
keywords: [Loops, Backend Query, Backend Logic, Control Flow, FlutterFlow]
88
---
99

10-
Sometimes, you might want to trigger certain actions multiple times. For example, an app might fetch data from a server, and you want to handle network errors by retrying the request up to a certain number of times.
10+
# Loops
1111

12-
:::info
13-
Every loop requires a condition, and the actions within the loop will continue to trigger as
14-
long as the condition holds true. When the condition becomes false, the loop terminates, and the next actions in the workflow will trigger.
15-
:::
12+
**Loops** in FlutterFlow allow you to perform repetitive tasks without writing complex code. This is useful when working with lists of data or when you want to repeat actions a certain number of times.
13+
14+
There are two types of loops supported in FlutterFlow:
15+
16+
## While Condition Loops
17+
18+
A **While Condition** loop requires a condition. The actions within the loop will continue to trigger as long as the condition holds true. When the condition becomes false, the loop terminates, and the next actions in the workflow will trigger.
19+
20+
For example, you can use a While Condition loop to continuously check if a user is still within a geofenced area. As long as the condition `isUserInLocation == true` holds, the app might keep checking for updates or show a live indicator.
1621

1722
![loop-block.png](img/loop-block.png)
23+
24+
## Over List
25+
26+
This loop type lets you iterate over a list of items to perform actions for each item in the list.
27+
28+
For example, if you have a list of items in a shopping cart and want to calculate the total price or apply a discount to each item, you can use Over List to go through each product and perform a calculation for each one.
29+
30+
You can also customize how the loop iterates:
31+
32+
- **Start Index**: Where the loop starts (default is `0`).
33+
- **End Index**: Where the loop ends (default is the length of the list).
34+
- **Step Size**: Interval between each iteration (e.g., set to `2` to loop through every second item).
35+
- **Reverse Order**: Enables the loop to iterate from the end of the list to the beginning (e.g., showing the latest messages first).
36+
37+
![loop-over-list.avif](img/loop-over-list.avif)
38+
39+
Inside a loop, you can access the current item and its index. This gives you the ability to work with each item individually, such as displaying item-specific data and making calculations.
40+
41+
![access-item-inside-loop.avif](img/access-item-inside-loop.avif)
42+
43+
:::tip[Nested Loops]
44+
45+
You can also add a loop inside another loop to handle related data structures. For example, looping through orders and then looping through each order’s line items.
46+
47+
:::
48+
49+
1850
## Loop Breaks
1951

2052
:::danger[AVOID an INFINITE LOOP]

docs/testing-deployment-publishing/branching-collaboration/branching.md

Lines changed: 5 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -188,75 +188,20 @@ During a merge, FlutterFlow compares the changes made in both branches, if the c
188188

189189
:::
190190

191-
### Initiating a Merge
192-
193-
FlutterFlow currently supports **two merging approaches**: the existing “**Merge**” functionality and the new “**Git Merge**” (v2).
194-
195-
- [**Merge (Legacy)**](#merge-legacy): The legacy merge uses a custom tool (originally built in FlutterFlow) to calculate differences and conflicts between branches.
196-
- [**Git Merge (New)**](#git-merge-new): The new Git Merge option leverages Git's robust repository and conflict-resolution capabilities.
197-
198-
:::warning
199-
200-
At present, both methods are available side by side, allowing you to either continue using the legacy merge or adopt Git Merge. Over time, as Git Merge proves its stability, the Legacy Merge option may be deprecated.
201-
202-
The Merge (Legacy) option has some known issues with merges being incorrectly calculated. Therefore, we **strongly recommend using [Git Merge](#git-merge-new)** whenever possible for a smoother and more accurate merge process.
203-
204-
:::
205-
206-
#### Merge (Legacy)
207-
208-
You can initiate a merge in either direction—merging from a parent branch into a child branch or from a child branch back into the parent branch—by selecting the **Branch** Options button next to the current branch in the Branching Menu.
209-
210-
<div style={{
211-
position: 'relative',
212-
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
213-
height: 0,
214-
width: '100%'
215-
}}>
216-
<iframe
217-
src="https://demo.arcade.software/VHuZbhTfT8Q8GbaMzMWA?embed&show_copy_link=true"
218-
title="Initiating a Merge"
219-
style={{
220-
position: 'absolute',
221-
top: 0,
222-
left: 0,
223-
width: '100%',
224-
height: '100%',
225-
colorScheme: 'light'
226-
}}
227-
frameborder="0"
228-
loading="lazy"
229-
webkitAllowFullScreen
230-
mozAllowFullScreen
231-
allowFullScreen
232-
allow="clipboard-write">
233-
</iframe>
234-
</div>
235-
<p></p>
236-
237-
238-
Next, you'll see a screen that will display if there are any conflicts. If you don’t have any conflicts, you can simply go ahead and click **Merge Branch**.
239-
240-
![merge](../imgs/merge.avif)
241-
242-
#### Git Merge (New)
243-
244-
The new Git Merge option uses Git under the hood to calculate differences between project files. Each project is backed by a repository of YAML files (except for custom code, which appears as Dart files). These YAML files map directly to various project properties, and Git calculates differences among these files to identify merge conflicts. This method provides clearer and more consistent conflict detection compared to [Merge (legacy)](#merge-legacy) (a custom solution).
191+
Merging in FlutterFlow uses Git under the hood to calculate differences between project files. Each project is backed by a repository of YAML files (except for custom code, which appears as Dart files). These YAML files map directly to various project properties, and Git calculates differences among these files to identify merge conflicts.
245192

246193
:::info[Future Plans]
247-
248-
This option is currently in **Beta**. In addition to fixing any issues, here’s what we have planned:
249-
250194
- **Hover-Based Documentation**: Display helpful tooltips for YAML fields (scheduled before production release).
251195
- **Inline YAML Errors**: Show errors directly in the file for quicker fixes (scheduled before production release).
252196
- **Simplified YAML**: Make YAML files and errors more user-friendly and understandable.
253197
- **Enhanced Visual Diff Tools**: Provide more intuitive views for comparing changes.
254198
- **User Experience Improvements**: Continuously refine merging workflows and UI elements.
255199
- **Performance Optimizations**: Improve speed when initiating merges.
256-
257200
:::
258201

259-
To initiate a Git Merge, navigate to **Toolbar >** select **Branching > Branching options >** select **Git Merge**.
202+
### Initiating a Merge
203+
204+
To initiate the Merge, navigate to **Toolbar >** select **Branching > Branching options >** select **Merge**.
260205

261206
<div style={{
262207
position: 'relative',
@@ -285,7 +230,7 @@ To initiate a Git Merge, navigate to **Toolbar >** select **Branching > Branchin
285230
<p></p>
286231

287232

288-
When performing a Git merge in FlutterFlow, you’ll see a screen with multiple panels and info sections. Here are the details of it.
233+
When performing a merge in FlutterFlow, you’ll see a screen with multiple panels and info sections. Here are the details of it.
289234

290235
![merging-window](imgs/merging-window.avif)
291236

@@ -430,79 +375,6 @@ For example, imagine two developers, Alice and Bob, are working on the same Flut
430375

431376
When Alice's changes are merged into the main project first, her updates will be integrated without any issues. However, when Bob tries to merge his changes afterward, a merge conflict will occur because the changes to the button text and color have already been modified by Alice.
432377

433-
In your project, if you get merge conflicts, here’s how you resolve them.
434-
435-
#### Merge (Legacy)
436-
437-
<div style={{
438-
position: 'relative',
439-
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
440-
height: 0,
441-
width: '100%'
442-
}}>
443-
<iframe
444-
src="https://demo.arcade.software/Ttcvg8zDKtlQSakqppOf?embed&show_copy_link=true"
445-
title="Resolving Merge Conflicts"
446-
style={{
447-
position: 'absolute',
448-
top: 0,
449-
left: 0,
450-
width: '100%',
451-
height: '100%',
452-
colorScheme: 'light'
453-
}}
454-
frameborder="0"
455-
loading="lazy"
456-
webkitAllowFullScreen
457-
mozAllowFullScreen
458-
allowFullScreen
459-
allow="clipboard-write">
460-
</iframe>
461-
</div>
462-
<p></p>
463-
464-
For certain conflicts, such as those involving variables and API configurations, you'll see a **View Configuration** option. Enabling this option opens the split screen view displaying changes from the new branch, allowing you to easily identify what has changed. In this view, you can see things that were removed highlighted in red, and things that were added highlighted in green.
465-
466-
![view-configuration](../imgs/view-configuration.avif)
467-
468-
469-
If you choose to resolve manually, you can directly make changes in the **Accepted Changes** section. Note that if you cancel a manual resolution, you can choose to either keep or discard the changes you have made since starting the manual resolution.
470-
471-
<div style={{
472-
position: 'relative',
473-
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
474-
height: 0,
475-
width: '100%'
476-
}}>
477-
<iframe
478-
src="https://demo.arcade.software/xZsRHG7d5rfNf5z937hZ?embed&show_copy_link=true"
479-
title="Sharing a Project with a User"
480-
style={{
481-
position: 'absolute',
482-
top: 0,
483-
left: 0,
484-
width: '100%',
485-
height: '100%',
486-
colorScheme: 'light'
487-
}}
488-
frameborder="0"
489-
loading="lazy"
490-
webkitAllowFullScreen
491-
mozAllowFullScreen
492-
allowFullScreen
493-
allow="clipboard-write">
494-
</iframe>
495-
</div>
496-
<p></p>
497-
498-
:::info
499-
500-
If the visual editor doesn't display something in the split screen UI that you need to manage during a merge, click the **Edit Project** button and edit the project as usual.
501-
502-
::::
503-
504-
505-
#### Git Merge (New)
506378
When you initiate a merge using Git, the system attempts to automatically reconcile your project files. Any conflicts that cannot be automatically resolved are flagged for your attention.
507379

508380
You can review each file with merge conflicts and choose to:

0 commit comments

Comments
 (0)