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/resources/projects/libraries.md
+100-42
Original file line number
Diff line number
Diff line change
@@ -11,42 +11,33 @@ import TabItem from '@theme/TabItem';
11
11
12
12
# Libraries
13
13
14
-
In FlutterFlow, a project can either be used to create an App or used to create a Library. A library allows you to share and reuse resources created in FlutterFlow across multiple projects. More specifically, with libraries, you can publish components, API calls, custom code, and more - all with version control. By using libraries, development becomes more efficient and scalable.
14
+
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.
15
15
16
-
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 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.
17
-
18
-

19
-
20
-
:::tip[possible usecases]
16
+
:::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.
18
+
:::
21
19
22
-
-**Modular Development**: Build large-scale apps by separating them into smaller, independently managed projects (e.g., UI library, backend integrations, etc.).
23
-
-**Team Collaboration**: Share reusable UI components, custom functions, or API integrations across multiple apps
24
-
-**Community Sharing**: Publish libraries that can be imported and reused by the broader FlutterFlow community - like UI Kits or utility functions.
20
+
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.
25
21
26
-
:::
22
+

27
23
28
-
### What’s Included When Importing a Library
24
+
### Importance of Libraries
29
25
30
-
When you import a library into a FlutterFlow project, the following resources are accessible for use:
26
+
Previously, FlutterFlow offered several methods to share resources between projects, such as team code libraries, design systems, API libraries, and by leveraging marketplace items. However, these methods had limitations, including the inability to share custom data types or custom functions alongside components or API calls and the absence of version control.
-[Custom Functions](../ff-concepts/adding-customization/custom-functions.md), [Actions](../resources/control-flow/functions/action-flow-editor.md), and [Widgets](../resources/ui/widgets/intro-widgets.md)
39
-
-[Assets](../resources/projects/settings/general-settings.md#app-assets) (Note: These are not versioned)
28
+
With Libraries, you can publish the complete FlutterFlow project as a library and import it as a dependency into other projects.
40
29
41
-
:::note
30
+
:::tip[possible usecases]
42
31
43
-
Pages and Firestore Collections are still being worked on and may come in future updates.
32
+
-**Modular Development**: Build large-scale apps by separating them into smaller, independently managed projects (e.g., UI library, backend integrations, etc.).
33
+
-**Team Collaboration**: Share reusable UI components, custom functions, or API integrations across multiple apps within a team.
34
+
-**Community Sharing**: Publish libraries that can be imported and reused by the broader FlutterFlow community.
44
35
45
36
:::
46
37
47
38
## Publishing a Library
48
39
49
-
To publish a project as a library, start by creating a FlutterFlow project as you normally would. Next, go to the **Publish as a Library** page in **App Settings**. Here you can specify the version number and message for the version you are publishing.
40
+
To publish a FlutterFlow project as a library, start by creating a FlutterFlow project as you normally would, then follow these steps:
50
41
51
42
<div style={{
52
43
position: 'relative',
@@ -81,6 +72,26 @@ To publish a project as a library, start by creating a FlutterFlow project as yo
81
72
- It's recommended to include a message that tells users what has changed in the version your are publishing.
82
73
:::
83
74
75
+
### Disabled Features in a Library
76
+
77
+
When a project is converted into a library, the following features are disabled to ensure compatibility and functionality limitations:
78
+
79
+
- App settings
80
+
- Firebase
81
+
- Development environment
82
+
- Authentication
83
+
- Push notifications
84
+
- Mobile deployment
85
+
- Web deployment
86
+
- Stripe
87
+
- Braintree
88
+
- Razorpay
89
+
- Google Analytics
90
+
- OneSignal
91
+
- Mux
92
+
- Cloud functions
93
+
- Firestore Collections
94
+
84
95
## Importing a Library
85
96
86
97
To import a library project into another FlutterFlow project, you must go to the **Project Dependencies** page in **App Settings**. Here you can specify the library project and version you are importing.
@@ -123,25 +134,7 @@ To import a library project into another FlutterFlow project, you must go to the
123
134
:::
124
135
125
136
126
-
You can easily upgrade to newer versions of the libraries as they become available. If a new update causes issues with your existing implementation, you also have the option to revert to a previous version.
127
-
128
-

129
-
130
-
## Access Library Resources
131
-
132
-
Once the library is imported, components and resources are accessible within the project. It's important to note that these resources show up where they are instantiated. For example:
133
-
134
-
-**Components** appear in the widget palette.
135
-
-**API calls** appear when making API calls in the action flow editor.
136
-
-**App State variables** appear where you can update app state in an action or leverage app state in a widget property.
137
-
-**Custom functions** are available when setting up actions or functions within the app.
138
-
139
-
This ensures that only relevant resources are shown where they are needed, optimizing performance and discoverability.
A **Dependency Conflict** occurs when two or more libraries added by a project depend on different versions of the same dependency. This creates a situation where the project cannot resolve which version to use, leading to a project error.
147
140
@@ -167,6 +160,71 @@ Follow these steps to ensure both libraries rely on the same version of Componen
167
160
2.**Modify Libraries**: If you have access to the library projects, adjust the dependencies of either User Auth Library or Payment Gateway Library (or both) to use the same version of the Components Library.
168
161
3.**Contact Library Maintainers**: If you do not own the library yourself, reach out to the maintainers of the library projects. They may provide guidance, suggest workarounds, or release a version that addresses the conflict.
169
162
163
+
## Access Library Resources
164
+
165
+
Once the library is imported, following resources are accessible for use:
-[Custom Functions](../../ff-concepts/adding-customization/custom-functions.md), [Actions](../../resources/control-flow/functions/action-flow-editor.md), and [Widgets](../../resources/ui/widgets/intro-widgets.md)
174
+
-[Assets](../../resources/projects/settings/general-settings.md#app-assets) (Note: These are not versioned)
175
+
176
+
:::note
177
+
Pages and Firestore Collections are still being worked on and may come in future updates.
178
+
:::
179
+
180
+
It's important to note that these resources show up where they are instantiated. For example:
181
+
182
+
-**Components** appear in the widget palette.
183
+
-**API calls** appear when making API calls in the action flow editor.
184
+
-**Custom functions** are available when setting up actions or functions within the app.
185
+
186
+
This ensures that only relevant resources are shown where they are needed, optimizing performance and discoverability.
Library versioning allows you to manage different versions of a library project over time. Using versioning, library users can control which version of a library to use in a project, ensuring compatibility and reducing the risk of breaking changes.
192
+
193
+
:::info[Importance of Library Versioning]
194
+
-**Maintain Backward Compatibility**: It ensures older versions of the library continue to work as expected while introducing new features.
195
+
-**Roll Back Changes**: In case of bugs or issues in a new version, you can easily revert to a previous stable version.
196
+
-**Control Updates**: Library users can decide when to upgrade to the latest version, rather than being forced into changes.
197
+
:::
198
+
199
+
### Publish New Version
200
+
201
+
When you're ready to update your library, ensure that all modifications are committed to the main branch of the library project and then publish as per instructions [here](#publishing-a-library).
202
+
203
+
:::tip
204
+
205
+
- While publishing a new version, add a description to highlight what's new or changed in this version.
206
+
- Each time a new version is published, the version number will automatically increment.
207
+
208
+
:::
209
+
210
+
### Import Specific Version
211
+
212
+
When importing a library into a project, you have the flexibility to choose which version of the library to use. By default, the latest version will be selected.
0 commit comments