paywall_kit library

paywall_kit — 12 conversion-optimized, drop-in Flutter paywall screens.

Backend-agnostic: works with in_app_purchase (native, free) or RevenueCat via the same single-flag config.

Classes

IapAdapter
Native adapter wrapping package:in_app_purchase.
PaywallAdapter
Backend bridge between paywall_kit's UI and a purchase system.
PaywallCopy
All user-facing strings on a paywall.
PaywallDismissed
User closed the paywall without purchasing.
PaywallErrored
Purchase / restore flow failed.
PaywallKit
Public entry point for the package.
PaywallProduct
A single purchasable tier displayed on a paywall.
PaywallPurchased
User completed a purchase.
PaywallRestored
User tapped "Restore" and at least one prior purchase was found.
PaywallResult
Outcome returned by PaywallKit.show.
PaywallTestimonial
A single customer testimonial rendered by the storytelling variant.
PaywallTheme
Visual theme applied across every paywall variant.
PreviewAdapter
No-op adapter for design / preview / test contexts.

Enums

PaywallPeriod
Billing period for a PaywallProduct.
PaywallVariant
The 12 paywall layouts shipped in v0.1.

Functions

computeSavingsPercent({required double fromPricePerMonth, required double toPricePerMonth}) int?
Compute the savings percentage when upgrading from from to to.
formatPaywallPrice({required double rawPrice, required String currencyCode, required PaywallPeriod period, String? locale}) String
Format a rawPrice for display on a paywall.

Typedefs

PaywallCtaCallback = void Function(PaywallProduct product)
Callback fired when the user taps a product / CTA.
PaywallDismissCallback = void Function()
Callback fired when the user dismisses the paywall without buying.
PaywallPurchaseFailCallback = void Function(Object error)
Callback fired when a purchase fails.
PaywallPurchaseSuccessCallback = void Function(PaywallProduct product)
Callback fired after a successful purchase.
PaywallViewCallback = void Function()
Callback fired once the paywall first appears on screen.