Docs

Flutterflow

Integrations

Welcome! This guide provides the official method for integrating the PushFire SDK into your FlutterFlow application using our dedicated FlutterFlow Library.

This library-based approach simplifies setup by pre-packaging all necessary custom actions. Follow these steps carefully to ensure a smooth and successful integration.

Step 1: Add the PushFire-Lib to Your Project

First, let's add the library to your FlutterFlow project.

  • In your FlutterFlow project, navigate to Settings & Integrations from the left-hand menu.
  • Go to Project Setup > Project DependenciesFlutterFlow Libraries.
  • Search for PushFire-Lib (you must acquire it in the FF marketplace first).
  • Click Add to Project.
image.png

Step 2: Configure Your API Key 🔑(Crucial!)

This is how should look like

⚠️ If you add the library and you can't see the pushFireApiKey field and provider, you will need to do the following steps:

image.png


1 - Click on version

image.png

2 - Select version 0.0.7
3 - Open the view details, and check that the pushFireApiKey and provider field is now visible.
4 - Select version 0.0.8 again and proceed with the process.

Once the library is added, you must configure it with your unique PushFire API key. This is a one-time setup step.

  • After adding the library, you will see it listed under "Project Dependencies".
  • The library exposes a Library Value called pushfireApiKey. This is where you will set your key.
  • Click on the input field that currently says Unset.
  • Paste your PushFire API Key (pushfire.app dashboard > Settings > API Reference > API Token) into the Value field.
  • To add the provider field > Pushfire-Lib Enums > AuthType > firebase
image.png

Step 3: Add the SDK Pubspec Dependency

While the FlutterFlow Library imports the pre-built actions, you must also add the core pushfire_sdk package to your project's dependencies.

This allows FlutterFlow to find and compile the SDK's code.

  • In FlutterFlow, Navigate to Settings & Integrations > Project Setup.
  • Go to the Pubspec Dependencies section.
  • Under Custom Pub Dependencies, click + Add Dependency.
  • In the Package Name field, enter pushfire_sdk.
  • In the Version field, enter ^0.1.3 (check latest recommended version).

image.png

Step 4: Initialize the SDK on App Launch

The PushFire SDK must be initialized once when your application starts. The pushfireInitialize custom action is included in the library for this purpose.

  • Navigate to the App Settings section in the left-hand menu (the gear icon ⚙️).
  • Go to the Custom Code > Configuration Files > Flutter > main.dart.
  • Under the Initial Actions, click + Add Action.
  • Select the Custom Action tab and choose pushfireInitialize from the list.

image.png

This action will automatically use the pushfireApiKey you configured in Step 2. You do not need to pass any parameters or edit the action's code.

✅ Setup Complete! You have now successfully integrated the PushFire SDK 🔥 into your FlutterFlow project. We suggest going to FlutterFlow Library References to setup actions that interact with the SDK. Happy building! 🚀