HeliumFlutterMethodChannel class

An implementation of HeliumFlutterPlatform that uses method channels.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
isInitialized bool
Whether Helium has already been initialized.
no setteroverride
methodChannel MethodChannel
The method channel used to interact with the native platform.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

canPresentUpsell(String trigger) Future<CanPresentUpsellResult?>
createPaddlePortalSession() Future<String?>
Creates a Paddle customer portal session and returns the portal URL. iOS only; returns null on Android.
override
createStripePortalSession({required String returnUrl}) Future<String?>
Creates a Stripe customer portal session and returns the portal URL. iOS only; returns null on Android.
override
disableExternalWebCheckout() Future<void>
Disable External Web Checkout. iOS only; no-op on Android.
override
disableRestoreFailedDialog() → void
override
enableExternalWebCheckout({required String successURL, required String cancelURL, Set<HeliumWebCheckoutProcessor>? paymentProcessors}) Future<void>
Enable External Web Checkout (Paddle/Stripe). iOS only; no-op on Android.
override
getExperimentInfoForTrigger(String trigger) Future<ExperimentInfo?>
override
getHeliumUserId() Future<String?>
Gets helium user id
override
getPaywallInfo(String trigger) Future<PaywallInfo?>
override
getUpsellWidget({required String trigger, PaywallEventHandlers? eventHandlers}) Widget
override
override
handleURL(String url) Future<bool>
Forward an incoming URL to Helium so it can react to External Web Checkout success/cancel redirects without waiting for the app to foreground.
override
hasActivePaddleEntitlement() Future<bool>
Returns true if the user has any active Paddle entitlement. iOS only; returns false on Android.
override
hasActiveStripeEntitlement() Future<bool>
Returns true if the user has any active Stripe entitlement. iOS only; returns false on Android.
override
hasAnyActiveSubscription() Future<bool>
override
hasAnyEntitlement() Future<bool>
override
hasEntitlementForPaywall(String trigger) Future<bool?>
override
hideAllUpsells() Future<bool>
override
hideUpsell() Future<bool>
override
initialize({required String apiKey, HeliumCallbacks? callbacks, HeliumPurchaseDelegate? purchaseDelegate, Widget? fallbackPaywall, String? customAPIEndpoint, String? customUserId, Map<String, dynamic>? customUserTraits, String? revenueCatAppUserId, String? fallbackBundleAssetPath, HeliumEnvironment? environment, HeliumPaywallLoadingConfig? paywallLoadingConfig, Set<String>? androidConsumableProductIds}) Future<String?>
Initialize helium sdk at the start-up of your flutter application.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overrideUserId({required String newUserId, Map<String, dynamic>? traits}) Future<String?>
Overrides user id to given newUserId
override
paywallsLoaded() Future<bool>
Returns bool based on paywall loaded or not
override
presentUpsell({required BuildContext context, required String trigger, PaywallEventHandlers? eventHandlers, Map<String, dynamic>? customPaywallTraits, bool? dontShowIfAlreadyEntitled}) Future<String?>
Presents view based on trigger
override
resetHelium({bool clearUserTraits = true, bool clearExperimentAllocations = false}) Future<void>
override
resetPaddleEntitlements() Future<void>
Resets Paddle entitlements and clears the user ID. iOS only; no-op on Android.
override
resetStripeEntitlements() Future<void>
Resets Stripe entitlements and clears the user ID. iOS only; no-op on Android.
override
setAllowWebCheckoutWithoutUserId(bool allow) Future<void>
Allow Web Checkout paywalls to show even when no custom user ID has been set via overrideUserId. iOS only; no-op on Android.
override
setAndroidConsumableProductIds(Set<String> productIds) → void
Set consumable product IDs for Android. These IDs will be used to identify consumable products in the Play Store and this is only respected if no custom purchaseDelegate is supplied. This is only relevant on Android and is a no-op on other platforms.
override
setCustomRestoreFailedStrings({String? customTitle, String? customMessage, String? customCloseButtonText}) → void
override
setLightDarkModeOverride(HeliumLightDarkMode mode) → void
override
setRevenueCatAppUserId(String rcAppUserId) → void
override
setThirdPartyAnalyticsAnonymousId(String? anonymousId) Future<void>
override
setupCore({required String apiKey, HeliumCallbacks? callbacks, HeliumPurchaseDelegate? purchaseDelegate, Widget? fallbackPaywall, String? customAPIEndpoint, String? customUserId, Map<String, dynamic>? customUserTraits, String? revenueCatAppUserId, String? fallbackBundleAssetPath, HeliumEnvironment? environment, HeliumPaywallLoadingConfig? paywallLoadingConfig, Set<String>? androidConsumableProductIds}) Future<String?>
Sets up core Helium configuration (delegates, callbacks, identity, etc.) without triggering native SDK initialization. Used by wrapper plugins (e.g. helium_stripe) that need to call their own specialized native initialization after core setup.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited