Skip to content

Commit

Permalink
Libraries support for Firebase (#249)
Browse files Browse the repository at this point in the history
* Added info on libraries with Firebase

* remove 1 example

* Minor fix

---------

Co-authored-by: Pooja Bhaumik <pbhaumik26@gmail.com>
  • Loading branch information
pinkeshmars and PoojaB26 authored Jan 15, 2025
1 parent 667d5ae commit 2f4473b
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions docs/resources/projects/libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ To publish a FlutterFlow project as a library, start by creating a FlutterFlow p
When a project is converted into a library, the following features are disabled to ensure compatibility and functionality limitations:

- App settings
- Firebase
- Supabase
- Development environments
- Authentication
Expand All @@ -98,8 +97,6 @@ When a project is converted into a library, the following features are disabled
- Google Analytics
- OneSignal
- Mux
- Cloud functions
- Firestore Collections

## Importing a Library

Expand Down Expand Up @@ -318,6 +315,24 @@ To set library values, navigate to **Settings and Integrations > Project Setup >
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.
:::

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

In library projects, you won’t see an option to link to a Firebase project. Instead, the project that imports the library handles the actual Firebase connection.

Any indexes or security rules defined in the library are recognized by the importing project and deployed accordingly.

:::warning[Limitations]
Libraries work with Firebase but have **some limitations**. The **Firebase Auth** and **Firebase Storage** are not directly supported in library projects at this time. If you need these features in your library’s functionality, you can include an action that accomplishes this task as a [**callback**](../../resources/ui/components/callbacks.md).
:::

If your team has multiple projects that share a common Firebase feature, turning it into a library is a great idea. This ensures the same logic is used and connects to the same Firestore project across all apps.

Here are some examples of library projects you can build with Firebase:

- **Basic Analytics or Tracking**: A library that logs events to Firestore; useful for aggregating usage data at an application level.
- **Configuration or Settings**: A library that serves app-wide configurations (like feature flags, UI themes, or layout choices) is handled in Firebase Remote Config.

## FAQs

<details>
Expand Down

0 comments on commit 2f4473b

Please sign in to comment.