Flutterflow + Pushfire SDK

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!)

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 into the Value field.
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.

  • 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.0 (check latest recommended version).
  • Click the Check Pubspec button to validate, then click Save. FlutterFlow will automatically run pub get in the background.
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. Happy building!🚀