Skip to main content
Requirements: Flutter 3.24.0+ · iOS 15+

1. Install the SDK

If you added it manually to pubspec.yaml, run:
See the Flutter SPM documentation for details. CocoaPods still works if you prefer it.

Set minimum iOS version

In ios/Podfile, ensure the minimum deployment target is set:
If you still see iOS version errors after this, follow Flutter’s guide on setting the minimum OS version in Xcode.

2. Initialize Helium

Call initialize in main.dart before runApp. Your API key is available in the Helium dashboard → Profile.
initialize
method

3. Show a Paywall

Before calling presentUpsell, make sure you have a trigger and workflow configured in the Helium dashboard.
Do not call presentUpsell inside Widget build() — this can cause unpredictable behavior.

The following steps are optional but strongly recommended for production apps.

Identify Users

User identification is optional. It improves targeting accuracy and event attribution in external analytics. Set user identity during initialize for consistency from the first session.

Paywall Events

Helium emits events throughout the paywall lifecycle. You can handle them per-presentation or globally.

Per-presentation handlers

Pass eventHandlers to presentUpsell:

Global event listener

Implement HeliumCallbacks and pass it to initialize to handle events across all paywalls without passing handlers at each call site:
You can also forward all events to an existing analytics provider.

Fallback Paywalls

Set up fallbacks to handle the rare case where a paywall fails to load. This is strongly recommended before going to production. Follow the fallback bundle guide once you have a production paywall ready.

Checking Entitlements

Check entitlement status before showing a paywall to avoid showing it to users who are already subscribed.

Advanced

RevenueCat Integration

By default, Helium manages purchases directly. If you’re already using RevenueCat, use the helium_revenuecat package to keep RevenueCat in control.

Install

Configure

Initialize RevenueCat first, then pass RevenueCatPurchaseDelegate to heliumFlutter.initialize:

Keeping appUserID in sync

If you change the RevenueCat appUserID, sync the value to Helium:

Custom Purchase Handling

By default, Helium handles purchases for you. This section is for apps that need custom purchase logic. Implement HeliumPurchaseDelegate and pass it to initialize:

Additional Methods

In most cases you don’t need this — Helium shows a loading indicator automatically if the paywall hasn’t finished downloading.Subscribe to the downloadStatus stream to observe changes:
Possible values: notDownloadedYet · inProgress · downloadSuccess · downloadFailureFor a simple boolean check:
Resets Helium so initialize can be called again. Useful after changing user traits that affect paywall targeting.