Skip to content

Commit 4381180

Browse files
committed
Library Pages
1 parent e57fcf7 commit 4381180

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

docs/resources/projects/libraries.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,49 @@ You can easily upgrade to newer versions of the libraries as they become availab
249249
![update-library](imgs/update-library.avif)
250250

251251

252+
## Library Pages
253+
254+
You can add and manage entire pages within a library, making it easy to reuse those pages across multiple projects. These pages function like any regular page in your app; they support navigation, parameters, state management, and transitions.
255+
256+
Publishing pages with libraries offers a modular approach to development, making it ideal for large teams and complex, multi-feature apps. For example, instead of recreating common flows, like onboarding and payments flow, you can build them once in a library and use them wherever needed.
257+
258+
:::tip[Possible Use Cases]
259+
- **Super Apps** like Gojek and Uber with distinct modules such as ride booking, shopping, and payments. Each module can be developed as a separate library and imported into a single main project.
260+
- **Enterprise Apps** with isolated user journeys for different roles, such as admin and customer. Each role-based flow can be built as its own library and integrated into the core app as needed.
261+
- **White-labeled Apps** that share common onboarding flows. The onboarding process can be built once as a library and reused across all branded versions of the app.
262+
:::
263+
264+
The library author selects the pages to include in the library and publish it. When users import or update the library, they can override the default route names to avoid route name conflicts between the library and your project. Library pages then appear in the navigation actions just like any regular page.
265+
266+
The library author selects the pages to include and publishes the library. When users import or update the library, they can override the default route names to avoid conflicts between the library and your project. Once imported, the library pages appear in navigation actions just like any other page in the project.
267+
268+
<div style={{
269+
position: 'relative',
270+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
271+
height: 0,
272+
width: '100%'}}>
273+
<iframe
274+
src="https://demo.arcade.software/fAgLrElyGNdf82NWGJte?embed&show_copy_link=true"
275+
title=""
276+
style={{
277+
position: 'absolute',
278+
top: 0,
279+
left: 0,
280+
width: '100%',
281+
height: '100%',
282+
colorScheme: 'light'
283+
}}
284+
frameborder="0"
285+
loading="lazy"
286+
webkitAllowFullScreen
287+
mozAllowFullScreen
288+
allowFullScreen
289+
allow="clipboard-write">
290+
</iframe>
291+
</div>
292+
<p></p>
293+
294+
252295

253296
## Library Values
254297

@@ -290,6 +333,7 @@ To create library values, navigate to **Settings and Integrations > App Settings
290333
</div>
291334
<p></p>
292335

336+
293337
#### Use Library Values
294338
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.
295339

@@ -333,6 +377,7 @@ To set library values, navigate to **Settings and Integrations > Project Setup >
333377
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#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.
334378
:::
335379

380+
336381
## Libraries with Firebase
337382
You can create collections and enable various Firebase features in library projects without connecting a separate Firebase project.
338383

0 commit comments

Comments
 (0)