Skip to main content

purchases_ui_flutter 10.18.1 copy "purchases_ui_flutter: ^10.18.1" to clipboard
purchases_ui_flutter: ^10.18.1 copied to clipboard

Flutter plugin that integrates RevenueCat Paywalls. This plugin supports iOS and Android.

RevenueCat

pub package

purchases_ui_flutter #

purchases_ui_flutter allows to use RevenueCat's paywalls and customer center in your Flutter application. Check our main SDK for more information and our paywalls documentation

Installation #

To use this plugin, add purchases_flutter and purchases_ui_flutter as a dependency in your pubspec.yaml file.

Paywalls #

Present your paywall like:

await RevenueCatUI.presentPaywall();

or conditionally based on entitlements:

await RevenueCatUI.presentPaywallIfNeeded("requiredEntitlementId");

Embed a full paywall with PaywallView, or place an original-template paywall below your own content with OriginalTemplatePaywallFooterView (formerly PaywallFooterView).

On Android, Flutter attempts to use Texture Layer Hybrid Composition by default, falling back to Hybrid Composition when necessary. If an embedded view stops rendering on affected Android 10 devices, explicitly select the more expensive Hybrid Composition mode:

PaywallView(
  androidPlatformViewMode: AndroidPlatformViewMode.hybridComposition,
);

The androidPlatformViewMode parameter is also available on OriginalTemplatePaywallFooterView, PaywallFooterView, and CustomerCenterView. It is ignored on iOS and macOS. See RevenueCat/purchases-flutter#1954 and flutter/flutter#160854 for details.

Customer Center #

Present as a modal (callbacks optional):

await RevenueCatUI.presentCustomerCenter(
  onRestoreCompleted: (customerInfo) {
    // handle restore success
  },
  onRefundRequestCompleted: (productId, status) {
    // handle refund completion
  },
);

// Or, if you don't need callbacks:
await RevenueCatUI.presentCustomerCenter();

Or display inline using the CustomerCenterView widget. See the CustomerCenterView implementation for full API details and callback options.

Requirements #

purchases_ui_flutter requires XCode 14.0+ and minimum targets iOS 11.0+ and Android 24+. Paywalls will only work on iOS 15.0+ and Android 24+.

SDK Reference #

Our full SDK reference can be found here.

Getting Started #

For more detailed information, you can view our complete documentation at docs.revenuecat.com.

92
likes
160
points
189k
downloads

Documentation

Documentation
API reference

Publisher

verified publisherrevenuecat.com

Weekly Downloads

Flutter plugin that integrates RevenueCat Paywalls. This plugin supports iOS and Android.

Homepage
View/report issues

License

MIT (license)

Dependencies

flutter, plugin_platform_interface, purchases_flutter

More

Packages that depend on purchases_ui_flutter

Packages that implement purchases_ui_flutter