Skip to content

Commit 1847519

Browse files
committed
Merge branch 'refs/heads/main' into pinkesh/update-ads
2 parents 2575fc6 + c906864 commit 1847519

File tree

9 files changed

+223
-18
lines changed

9 files changed

+223
-18
lines changed

docs/ff-concepts/layout/responsive-layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ For `Row 2`, set its Expansion property to *Flexible* (the middle icon) and assi
8585

8686
![test-expansion.avif](imgs/test-expansion.avif)
8787

88-
I encourage you to test with different web dimensions and sizes to see how well this adapts.
88+
We encourage you to test with different web dimensions and sizes to see how well this adapts.
8989

9090
Depending on your design needs, there are various approaches to managing space. Let's consider a different scenario: What if we want the searchBar to always occupy 40% of the screen width, with `Row 2` taking up the remaining space after placing the `searchBar` and `search IconButton`?
9191

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
slug: /concepts/layouts/flex
3+
title: Flex
4+
description: Learn how to add the Flex widget in your FlutterFlow app.
5+
tags: [Flex, Widget, Concepts]
6+
sidebar_position: 2
7+
keywords: [FlutterFlow, Wrap, Concepts]
8+
---
9+
10+
# Flex
11+
12+
The **Flex** widget can be used as an alternative to **Row** and **Column**. It allows you to dynamically set the layout axis (horizontal or vertical) based on specific conditions or logic. This is especially useful for creative responsive layouts - where child elements should be horizontal when the screen is wide, and vertical when the screen is narrow.
13+
14+
![flex.png](imgs/flex.png)
15+
16+
17+
18+
## Adding Flex Widget
19+
20+
To use the Flex widget, add it from the **Layout Elements** section of the **Widget Palette**, then add child widgets inside it. From the properties panel, set a condition for the **Is Horizontal** property. When this condition evaluates to `True`, the items will be laid out horizontally.
21+
22+
Consider an ecommerce app where recent orders are displayed vertically on mobile devices and switch to a horizontal layout on larger screens to make better use of the available space.
23+
24+
<div style={{
25+
position: 'relative',
26+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
27+
height: 0,
28+
width: '100%'}}>
29+
<iframe
30+
src="https://demo.arcade.software/3zWIgGDDec21fNIeCVOU?embed&show_copy_link=true"
31+
title=""
32+
style={{
33+
position: 'absolute',
34+
top: 0,
35+
left: 0,
36+
width: '100%',
37+
height: '100%',
38+
colorScheme: 'light'
39+
}}
40+
frameborder="0"
41+
loading="lazy"
42+
webkitAllowFullScreen
43+
mozAllowFullScreen
44+
allowFullScreen
45+
allow="clipboard-write">
46+
</iframe>
47+
</div>
48+
<p></p>
49+
50+
Here's another example of using a Flex widget on a create account page to dynamically align the signup fields based on screen size.
51+
52+
<div style={{
53+
position: 'relative',
54+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
55+
height: 0,
56+
width: '100%'}}>
57+
<iframe
58+
src="https://demo.arcade.software/HPk574WhIatWbJBdlxtf?embed&show_copy_link=true"
59+
title=""
60+
style={{
61+
position: 'absolute',
62+
top: 0,
63+
left: 0,
64+
width: '100%',
65+
height: '100%',
66+
colorScheme: 'light'
67+
}}
68+
frameborder="0"
69+
loading="lazy"
70+
webkitAllowFullScreen
71+
mozAllowFullScreen
72+
allowFullScreen
73+
allow="clipboard-write">
74+
</iframe>
75+
</div>
76+
<p></p>
77+
78+
:::tip[Best Practices]
79+
80+
- If you only need a simple vertical or horizontal arrangement, consider using [**Row**](../../../resources/ui/widgets/composing-widgets/rows-column-stack.md) or [**Column**](../../../resources/ui/widgets/composing-widgets/rows-column-stack.md).
81+
- For very large numbers of children, consider using [**ListView**](../../../resources/ui/widgets/composing-widgets/list-grid.md#listview-widget) or [**GridView**](../../../resources/ui/widgets/composing-widgets/list-grid.md#gridview-widget) instead of **Flex**, as they offer better performance for scrolling large lists of items.
82+
- When the content exceeds the screen limit, you can enable scrolling to make the content accessible. However, if you want to avoid scrolling altogether and still fit all the content on the screen, consider using a [**Wrap**](wrap-widget.md) widget.
83+
84+
:::
85+
86+
## Customization
87+
88+
When **Is Horizontal** property is disabled, the Flex widget behaves like a Column, and when enabled, it acts as a Row. Settings like [main axis alignment](../../../resources/ui/widgets/composing-widgets/rows-column-stack.md#main-axis), [cross axis alignment](../../../resources/ui/widgets/composing-widgets/rows-column-stack.md#cross-axis), [scrollability](../../../resources/ui/widgets/composing-widgets/rows-column-stack.md#scrollability), and [spacing](../../../resources/ui/widgets/composing-widgets/rows-column-stack.md#spacing) work the same way they do for the Column and Row widgets.
89+
90+
49.2 KB
Loading

docs/intro/ff-ui/my-organization.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ Learn [**how to create a team**](../../accounts-billing/subscriptions/flutterflo
2626

2727
## Team code
2828

29+
30+
:::warning
31+
**Team Code Libraries are now deprecated**. Please use the new [**Libraries**](../../resources/projects/libraries.md) to share and reuse projects across multiple projects.
32+
:::
33+
2934
Imagine you are working on multiple apps. As the project progresses, you realize that some of the custom code can be used across multiple apps. With *Team Code*, you can create [Custom Functions](../../ff-concepts/adding-customization/custom-functions.md), [Widgets](../../resources/ui/widgets/composing-widgets/rows-column-stack.md), and [Actions](../../resources/control-flow/functions/action-flow-editor.md) that will be shared between your team members and their projects.
3035

3136
This helps you reduce building time, effort, and costs by allowing members to reuse existing code. Furthermore, shared code is easier to maintain as changes only need to be made in one place.
@@ -146,7 +151,11 @@ The shared media assets will have the 'teams' icon at the bottom right side.
146151

147152
A company may have a website, a mobile app, and a desktop app, each with its own user interface and user experience. In such a case, rather than creating the same UI configuration for each project, creating a shared design system can help speed up the work and ensure consistency across all projects.
148153

149-
A design system includes colors, typography, fonts, icons, app assets, a nav bar, and an app bar, as well as pre-designed UI components such as buttons and text widgets.
154+
A design system includes colors, typography, fonts, icons, app assets, a nav bar, and an app bar.
155+
156+
:::tip
157+
To store pre-designed UI components, we highly recommend using [**Libraries**](../../resources/projects/libraries.md) for easy reuse across projects.
158+
:::
150159

151160
Here's how you can share the design library:
152161

@@ -211,7 +220,9 @@ Here's how you can share the design library:
211220
<p></p>
212221

213222
## Team API library
214-
223+
:::warning
224+
**Team API Libraries are now deprecated**. Please use the new [**Libraries**](../../resources/projects/libraries.md) to share and reuse projects across multiple projects.
225+
:::
215226
Imagine a company that has multiple mobile apps for different purposes, such as a shopping app, a loyalty app, and a delivery app. All these apps require similar functionalities, such as user authentication, product information, and order management. However, each app is developed by a different team.
216227

217228
To ensure consistency and efficiency across all the apps, the company decides to create a centralized API that can be used and modified as per the team's requirements. Sharing API calls also allows for easier testing and debugging, as any issues can be traced back to a single source.
Binary file not shown.

docs/resources/projects/libraries.md

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import TabItem from '@theme/TabItem';
1414
Libraries enables you to share and reuse entire FlutterFlow projects as dependencies across multiple projects. This allows teams and developers to modularize their apps by creating shared libraries that include components, API calls, custom code, and more. By using libraries, development becomes more efficient and scalable.
1515

1616
:::info
17-
A **Dependency** refers to an external library or resource that your project relies on to function correctly. When you create a new FlutterFlow project, certain dependencies are automatically added to support the generated code. Also, when you use a [Custom Widget](../../ff-concepts/adding-customization/custom-widgets.md), you are essentially adding dependencies to your project. Libraries take this concept further by allowing you to add entire FlutterFlow projects as dependencies.
17+
A **Dependency** refers to an external library or resource that your project relies on to function correctly. When you create a new FlutterFlow project, certain dependencies are automatically added to support the generated code. Also, when you use a [**Custom Widget**](../../ff-concepts/adding-customization/custom-widgets.md), you are essentially adding dependencies to your project. Libraries take this concept further by allowing you to add entire FlutterFlow projects as dependencies.
1818
:::
1919

2020
Imagine you're building an e-commerce app, and different teams are working on various features. One team develops a complex payment system. By using the Libraries, they can publish the payment system as a reusable library and allow other teams to easily import and integrate it into multiple projects without duplicating development efforts.
@@ -234,6 +234,89 @@ You can easily upgrade to newer versions of the libraries as they become availab
234234

235235
![update-library](imgs/update-library.avif)
236236

237+
## Library Values
238+
239+
**Library values** are essentially variables created and used by a library author and intended to have their values set by the library user. These values allow library author to create configurable variables that are useful in different contexts, such as API keys, global settings, or other project-specific configurations. These values allow library users to input specific data required for the library to function properly in their project.
240+
241+
For example, If someone has built a library that uses OpenAI API, they would define a Library Value for the OpenAI API key. As the user of the library, when you import, you must provide your own API key to ensure the library functions properly.
242+
243+
By using Library Values, the library author allows users to adapt the library to their own configurations without hardcoding sensitive or project-specific data, like API keys, into the library itself.
244+
245+
### Create Library Values as Author
246+
247+
The library author defines the variable name, data type (e.g., string, enum), whether the variable is nullable, and an optional default value.
248+
249+
To create library values, navigate to **Settings and Integrations > App Settings > Publish as Library > Library Values** section and click **+ Add Value**.
250+
251+
<div style={{
252+
position: 'relative',
253+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
254+
height: 0,
255+
width: '100%'}}>
256+
<iframe
257+
src="https://demo.arcade.software/vGIveMr1UmSlaiOreYmR?embed&show_copy_link=true"
258+
title=""
259+
style={{
260+
position: 'absolute',
261+
top: 0,
262+
left: 0,
263+
width: '100%',
264+
height: '100%',
265+
colorScheme: 'light'
266+
}}
267+
frameborder="0"
268+
loading="lazy"
269+
webkitAllowFullScreen
270+
mozAllowFullScreen
271+
allowFullScreen
272+
allow="clipboard-write">
273+
</iframe>
274+
</div>
275+
<p></p>
276+
277+
#### Use Library Values
278+
After setting Library Values, they function just like any other variable in FlutterFlow. You can bind them to components, actions, API calls, or any property that allows you to configure dynamic values across your library project. You can access Library Values via the ****Set from Variable**** menu.
279+
280+
:::tip
281+
Library values are used only within the library project and are not available for use in the project that imports it. The library user can only set their values.
282+
:::
283+
284+
![access-library-values](imgs/access-library-values.avif)
285+
286+
### Set Library Values as User
287+
288+
To set library values, navigate to **Settings and Integrations > Project Setup > Project Dependencies** page. When you import a library, you'll be prompted to set values for required Library Values. If the library has already been added, click on **View Details**, which will open a dialog and then you can enter a value.
289+
290+
<div style={{
291+
position: 'relative',
292+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
293+
height: 0,
294+
width: '100%'}}>
295+
<iframe
296+
src="https://demo.arcade.software/JG68MN6oBpZpPvHnKDmh?embed&show_copy_link=true"
297+
title=""
298+
style={{
299+
position: 'absolute',
300+
top: 0,
301+
left: 0,
302+
width: '100%',
303+
height: '100%',
304+
colorScheme: 'light'
305+
}}
306+
frameborder="0"
307+
loading="lazy"
308+
webkitAllowFullScreen
309+
mozAllowFullScreen
310+
allowFullScreen
311+
allow="clipboard-write">
312+
</iframe>
313+
</div>
314+
<p></p>
315+
316+
:::tip
317+
For different [**development environments**](../../testing-deployment-publishing/development-environments/development-environments.md) (e.g., development vs. production), you can bind Library Values to [**environment values**](../../testing-deployment-publishing/development-environments/development-environments.md#use-environment-values). For instance, you could have two different Library Values for an API key, such as `DEV_OPENAI_API_KEY` and `PROD_OPENAI_API_KEY`, and bind them to the development and production environments to track API usage separately.
318+
:::
319+
237320
## FAQs
238321

239322
<details>

docs/resources/ui/pages/intro-pages.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,30 @@ sidebar_position: 1
66

77
# Introduction to Pages
88

9+
In FlutterFlow, a **Page** represents a single screen in your app. Under-the-hood pages use a **Scaffold**, a [foundational widget from Flutter](https://api.flutter.dev/flutter/material/Scaffold-class.html) that provides a structured layout for a screen within your app. The Scaffold offers essential elements like the AppBar and Body, allowing you to easily build screens.
910

10-
In FlutterFlow, each **Page** you create is fundamentally structured using a **Scaffold**, a [foundational widget from Flutter](https://api.flutter.dev/flutter/material/Scaffold-class.html) that provides a structured layout for your app. The Scaffold offers essential elements like the AppBar, Floating Action Button (FAB), Drawer, and Body, allowing you to easily organize and design your pages.
11+
Pages are composed of various UI elements, or widgets. Widgets are added to a page when they are added to the page's **Widget Tree**.
12+
13+
In FlutterFlow, pages are automatically configured to handle [routing](https://docs.flutterflow.io/resources/ui/pages/properties#route-settings). Additionally, pages can have [input parameters](https://docs.flutterflow.io/resources/ui/pages/properties#page-parameters) and [state variables](https://docs.flutterflow.io/resources/ui/pages/page-lifecycle#page-state).
1114

1215
:::info
1316
For more details on how to use Scaffold and the various Page Elements in FlutterFlow, see the dedicated **[Page Elements](page-elements.md)** guide.
1417
:::
1518

1619

17-
18-
1920
## Creating a Page
2021

21-
In FlutterFlow, you can craft a page tailored to your expertise, design preferences, or specific
22-
use case needs. Whether you're starting from scratch, using a template, or leveraging AI tools,
22+
In FlutterFlow, you can seamlessly craft a page tailored to your needs and design preferences.
23+
Whether you're starting from scratch, using a template, or leveraging AI tools,
2324
there are several pathways to achieve the desired functionality and aesthetic of your desired Page.
2425

25-
FlutterFlow allows you to easily create new pages using the "Add Page, Component, or Flow" button, which is available from the Pages view. This will help you
26-
quickly start and add new pages to your app.
27-
2826
:::tip[Generated Code]
2927
When you create a page in FlutterFlow, a `Widget` class and a corresponding `Model` class are automatically generated. You can view these in the Code Viewer. To explore the details of the generated `Model` class, take a closer [**look at the code**](../../../generated-code/page-model.md).
3028
:::
3129

30+
FlutterFlow allows you to easily create new pages using the **Add Page, Component, or Flow** button,
31+
which is available from the **Page Selector** tab in the **Navgation Menu**. This will help you
32+
quickly start and add new pages to your app.
3233

3334
<img src="/img/page-selector.png" width="50%" />
3435

docs/testing-deployment-publishing/exporting-code/ff-cli.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,27 @@ To use the CLI, you'll need to create an API token and use it in your requests.
6464

6565
| Flag | Behavior | Default |
6666
| --- | --- | --- |
67-
| --dest / -d | Specifies a destination folder other than the current directory | Current directory |
68-
| --[no]-include-assets | Option to download assets (images, GIFs). Useful for consecutive code exports if the assets folder hasn't changed | False |
69-
| --branch-name / -b | Downloads from a specific branch | Main |
70-
| --[no]-fix | Option to run dart fix on the code after downloading | False |
71-
| --[no]-parent-folder | Option to download the code into a subfolder instead of directly into the directory | False |
67+
| --dest / -d | Specifies a destination folder other than the current directory. | Current directory |
68+
| --[no]-include-assets | Option to download assets (images, GIFs). Useful for consecutive code exports if the assets folder hasn't changed. | False |
69+
| --branch-name / -b | Downloads from a specific branch. | Main |
70+
| --[no]-fix | Option to run dart fix on the code after downloading. | False |
71+
| --[no]-parent-folder | Option to download the code into a subfolder instead of directly into the directory. | False |
72+
| --[no]-as-module | Whether to generate the project as a Flutter module. | False |
73+
| --[no]-as-debug | Whether to generate the project with debug logging to be able to use FlutterFlow Debug Panel inside the DevTools. | False |
74+
| --project-environment | Which [development environment](../development-environments/development-environments.md) to be used. If empty, the current environment in the project will be downloaded. | Current environment |
7275

7376
## Filtered exports
7477

75-
We've developed [a solution](https://github.com/krabhishek/flutterflow-filtered-pull) that allows you to use the CLI tool without overwriting specific files or directories. This is especially useful if you're managing code outside of FlutterFlow and want to prevent it from being overwritten during a code export.
78+
We've developed [a solution](https://github.com/krabhishek/flutterflow-filtered-pull) that allows you to use the CLI tool without overwriting specific files or directories. This is especially useful if you're managing code outside of FlutterFlow and want to prevent it from being overwritten during a code export.
79+
80+
## FAQ
81+
<details>
82+
<summary>I am getting an error as FormatException: Missing argument for…</summary>
83+
<p>
84+
This error likely indicates that you haven't correctly entered the command option along with its value. Double-check that all required information has been entered. If everything is correct and you're still encountering the error, it might be due to using an outdated version of the FlutterFlow CLI. To resolve this, you can update to the latest version by running the installation command:
85+
```
86+
dart pub global activate flutterflow_cli
87+
```
88+
This should update the CLI and fix the issue.
89+
</p>
90+
</details>

firebase.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2292,6 +2292,11 @@
22922292
"source": "/firebase-setup",
22932293
"destination": "/integrations/firebase/connect-to-firebase",
22942294
"type": 301
2295+
},
2296+
{
2297+
"source": "/building-your-ui/ui-builder/properties-panel",
2298+
"destination": "/resources/ui/widgets/properties",
2299+
"type": 301
22952300
}
22962301
]
22972302
}

0 commit comments

Comments
 (0)