rovenue_flutter library
Rovenue Flutter SDK — subscription, entitlement, and funnel client for the open-source Rovenue backend (RevenueCat/Adapty-style API).
This is the app-facing package of a federated plugin. It re-exports the
shared Dart API defined in rovenue_flutter_platform_interface; the
actual native work happens in the rovenue_flutter_ios and
rovenue_flutter_android platform packages, which wrap the shared Rust
core (librovenue) already used by the Swift and Kotlin SDKs.
Use the Rovenue.instance singleton. RovenueFunnelView hosts the
native funnel renderer (SwiftUI on iOS, Android Views on Android) as a
platform view — see src/funnel_view.dart.
There is no paywall API: placements serve funnels, drawn by
RovenueFunnelView.
Classes
- ClaimInstallParams
-
Optional device/install context passed to
claimInstall. All fields are optional. MirrorsRvClaimInstallParams. - Discount
-
Mirrors
RvDiscount/DiscountDTO. - Entitlement
- A single granted (or expired) entitlement.
- ExperimentAssignment
-
A subscriber's assignment into a running experiment. Mirrors
RvExperimentAssignment/ExperimentAssignmentDTO. - FunnelCheckOutcome
- Your checker's final answer for a photo check.
- FunnelCheckRequest
-
What the SDK asks your photo checker (
onCheck). - FunnelClaim
-
The result of resolving a funnel token/deep link/clipboard token to a
subscriber. Mirrors
RvFunnelClaim. - FunnelPhotoRef
-
The photo a
photo_uploadquestion was answered with — normalised and stored on the device (an upright JPEG with no metadata). Rovenue never receives it. CallRovenue.releasePhotoonce you are done with the file; an unreleased one is deleted 7 days after it was picked. - FunnelPresentationOverride
- A present call's partial override of how the funnel's editor settings present it; a field left null keeps the funnel's own.
- FunnelPresentHandlers
- The host's hooks for a presented funnel. Every one is optional: with none, the SDK performs purchases and restores itself.
- FunnelPresentResult
-
What
presentFunnelresolves with. - IntroPrice
-
Mirrors
RvIntroPrice/IntroPriceDTO. - Offering
-
A named group of RovenuePackages. Mirrors
RvOffering/OfferingDTO. - Offerings
-
All configured Offerings plus which one is current. Mirrors
RvOfferings/OfferingsDTO. - PricingPhase
-
A single phase of a subscription option's pricing schedule (e.g. a free
trial phase followed by a full-price phase). Mirrors
RvPricingPhase/PricingPhaseDTO. - PurchaseResult
-
The outcome of a successful
purchase()orrestorePurchases()call. MirrorsRvPurchaseResult/PurchaseResultDTO. - Rovenue
- Rovenue's app-facing Dart API. Use the instance singleton.
- RovenueChangeEvent
-
A native
onChangeevent: something the SDK caches locally changed and the app should refresh its own view of it. MirrorsRvChangeEvent. - RovenueFunnelAction
- An action the funnel's author defined for this app to interpret.
- RovenueFunnelDraftIssue
- One problem that keeps a draft from being served, as the funnel's validator reported it.
- RovenueFunnelLoaded
-
onLoaded: the funnel's first screen is on screen. - RovenueFunnelScreen
-
onScreenChanged: the visible screen changed, including the first. -
onUnavailable: the view has nothing to draw, and why. - RovenueFunnelView
- Hosts the native funnel renderer for placementIdentifier.
- RovenueLogRecord
-
A single log line forwarded from the Rust core's log sink. Mirrors
RvLogRecord/LogEntryDTO. - RovenuePackage
-
One purchasable package within an Offering. Mirrors
RvPackage/PackageDTO. - RovenuePeriod
-
A billing period, e.g. "1 month". Mirrors
RvPeriod/PeriodDTO. - RovenueUser
- The current identified (or anonymous) subscriber.
- StoreProduct
-
A purchasable store product. Mirrors
RvStoreProduct/StoreProductDTO. - SubscriptionOption
-
An Android subscription offer (base plan + optional offer). Mirrors
RvSubscriptionOption/SubscriptionOptionDTO. - VirtualCurrencyGrant
-
One credit grant a package's product pays: amount of the virtual
currency code, on grantOn (
"PURCHASE","RENEWAL"or"BOTH"today; newer values pass through verbatim). The same rule the server grants by. MirrorsRvVirtualCurrencyGrant/VirtualCurrencyGrantDTO.
Enums
- AttributionProvider
-
The mobile measurement partner whose attribution callback is forwarded
to
Rovenue.setAttribution. name is the wire value. - DiscountType
-
Mirrors
RvDiscountType/DiscountTypeDTO. - FunnelPresentationEnter
- How a full-screen funnel enters; Reduce Motion / animations off make each a fade.
- FunnelPresentationStyle
- How a presented funnel covers the app.
- FunnelPresentOutcome
- How a presentation ended.
- FunnelSheetDetent
- A sheet height.
- PackageType
-
Mirrors
RvPackageType/PackageTypeDTO. - PaymentMode
-
Mirrors
RvPaymentMode/PaymentModeDTO. - PeriodUnit
-
Mirrors
RvPeriodUnit/PeriodUnitDTO. - ProductCategory
-
Mirrors
RvProductCategory/ProductCategoryDTO. - ProductType
- Subscription vs. one-time / consumable purchase.
- PurchasePendingReason
-
Why a purchase came back deferred (PurchaseResult.isDeferred).
Mirrors
RvPendingReason/PurchasePendingReasonDTO. - RecurrenceMode
-
Mirrors
RvRecurrenceMode/RecurrenceModeDTO. - RovenueChangeKind
-
Discriminant of a
RovenueChangeEvent(nativeonChangepayload). - RovenueErrorKind
- The normalized error taxonomy shared across every Rovenue SDK façade.
- Why a RovenueFunnelView has nothing to draw. wireName is the spelling every Rovenue SDK reports.
- RovenueLogLevel
-
Severity of a RovenueLogRecord, forwarded from the Rust core's log
sink. Mirrors
RvLogLevel. - SessionEventKind
-
The kind of app-lifecycle transition reported by
recordSessionEvent.
Functions
-
extractFunnelToken(
String url) → String? - Extract a funnel token from a deep link / Universal Link. Recognises:
Typedefs
-
FunnelCheckHandler
= Future<
FunnelCheckOutcome?> Function(FunnelCheckRequest request) -
Your photo checker: return the outcome, or null (or throw) to apply the
check's
whenUnavailable. The native SDK bounds it by the check'stimeoutMs; a later answer is ignored and the result istimeout.
Exceptions / Errors
- RovenueException
- The exception type every public Rovenue Flutter API throws. App code should catch this instead of PlatformException — the method channel layer never lets a raw PlatformException escape to callers.