Skip to content

HEL-4783: Add onEntitled callback to presentUpsell#75

Open
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/HEL-4783-agent-ticket-workflow-437f
Open

HEL-4783: Add onEntitled callback to presentUpsell#75
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/HEL-4783-agent-ticket-workflow-437f

Conversation

@cursor

@cursor cursor Bot commented Mar 14, 2026

Copy link
Copy Markdown

Adds optional onEntitled VoidCallback parameter to presentUpsell that fires on purchase success, purchase restore, or when the paywall is not shown because the user already has entitlement (when dontShowIfAlreadyEntitled is true). Bridges the existing native iOS and Android onEntitled parameter through to the Flutter SDK.

Linear ticket: https://linear.app/tryhelium/issue/HEL-4783/flutter-implement-onentitled-feature-request

Changes

  • Dart public API (helium_flutter.dart): Add VoidCallback? onEntitled parameter with docs
  • Platform interface (helium_flutter_platform.dart): Add VoidCallback? onEntitled to abstract method
  • Method channel (helium_flutter_method_channel.dart): Store _currentOnEntitled, handle "onEntitled" callback from native, clean up on paywall close/skip/fail/reset
  • Constants (contants.dart): Add onEntitledMethodName
  • iOS (HeliumFlutterPlugin.swift): Pass onEntitled closure to Helium.shared.presentPaywall() that sends method channel call back to Dart
  • Android (HeliumFlutterPlugin.kt): Pass onEntitled lambda to Helium.presentPaywall() that sends method channel call on main thread
  • Tests: Update mock to include new parameter
Open in Web View Automation 

Add optional onEntitled VoidCallback parameter to presentUpsell that
fires on purchase success, purchase restore, or when the paywall is
not shown because the user already has entitlement (when
dontShowIfAlreadyEntitled is true).

Changes:
- Dart: Add onEntitled param to public API, platform interface, and
  method channel implementation
- iOS: Pass onEntitled closure to native Helium.shared.presentPaywall()
- Android: Pass onEntitled lambda to native Helium.presentPaywall()
- Method channel: Store _currentOnEntitled, handle 'onEntitled' callback
  from native, clean up on paywall close/skip/fail/reset
- Tests: Update mock to include new parameter
@salami salami marked this pull request as ready for review March 14, 2026 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant