FunnelPresentHandlers class

The host's hooks for a presented funnel. Every one is optional: with none, the SDK performs purchases and restores itself.

Constructors

FunnelPresentHandlers({Future<bool> onPurchase(String packageId)?, Future<bool> onWinBackPurchase(String packageId, String winBackOfferId)?, Future<bool> onRestore()?, void onPurchaseError(RovenueException error)?, void onUrl(String url)?, void onCustomAction(String actionId, String paramsJson)?, void onPhotoSelected(String questionKey, FunnelPhotoRef photo)?, FunnelCheckHandler? onCheck})
Creates the hooks.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
onCheck → FunnelCheckHandler?
Your photo checker; without it a check applies its whenUnavailable.
final
onCustomAction → void Function(String actionId, String paramsJson)?
A custom action the funnel runs: its id and its params as JSON.
final
onPhotoSelected → void Function(String questionKey, FunnelPhotoRef photo)?
A photo_upload question was answered: its key and the photo on the device.
final
onPurchase → Future<bool> Function(String packageId)?
Perform the purchase of this package yourself; return whether it went through. While it runs the funnel cannot be swiped or backed away.
final
onPurchaseError → void Function(RovenueException error)?
Observe a failed purchase or restore the SDK performed (never a cancelled sheet, never your own onPurchase / onRestore).
final
onRestore → Future<bool> Function()?
Perform a restore yourself; return whether it restored anything.
final
onUrl → void Function(String url)?
A URL the funnel opens; without it, an http(s) URL opens in the browser.
final
onWinBackPurchase → Future<bool> Function(String packageId, String winBackOfferId)?
Perform a purchase the funnel sells at the package's win-back offer yourself (a purchase with "offer": "win_back" the visitor is eligible for): buy it with Rovenue.purchase(product, winBackOffer:), the offer from Rovenue.eligibleWinBackOffers(product) whose identifier is winBackOfferId (iOS: StoreKit's offer id; Android: "<basePlanId>:<offerId>"). Return whether it went through.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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