flutter_iap_plus 1.0.0 copy "flutter_iap_plus: ^1.0.0" to clipboard
flutter_iap_plus: ^1.0.0 copied to clipboard

PlatformAndroid

Flutter package for in-app purchase with 5 ready-made subscription UI templates. Handles product loading, purchase, restore, and premium state out of the box for iOS and Android.

1.0.0 #

First public release. Major cleanup and API rework over the internal 2.0.x line.

Breaking changes #

  • PurchasesManager.init now accepts Set<String> productIds instead of a single String productId. The single-product overload is still supported via productId: for backward compatibility.
  • PurchasesManager.buy() now accepts an optional productId parameter to pick which product to purchase. When omitted, defaults to the first available product.
  • Removed public mutable context field. Error dialogs now receive the context from openPurchaseScreen automatically.
  • Removed dead purchaseScreen public field (was never settable).
  • SharedPreferences premium key is now scoped per productId (flutter_iap_plus.premium.<productId>) instead of the hard-coded hasWeeklyPremium. Existing users will appear non-premium after upgrade until restore completes.

New features #

  • productDuration is now configurable via init() (default 7 days).
  • Optional Logger injection via init(logger: ...).
  • New purchaseEvents stream exposing unified PurchaseEvents (pending | success | restored | canceled | error).
  • isPremium now reads from persisted storage on init() to avoid race conditions on app cold start.
  • BlocBase is now exported for direct use.

Fixes #

  • Error dialog now actually shows (previously the required context field was never set anywhere in the package).
  • _iapSubscription is properly closed on dispose().

Documentation #

  • Full dartdoc coverage on the public API.
  • New USAGE.md with complete integration guide.
  • Updated example/ with a clean, minimal sample.

Misc #

  • Bumped flutter_lints to ^5.0.0.
  • Pinned all dependency versions.
  • Added LICENSE (MIT) and complete pub.flutter-io.cn metadata.
3
likes
150
points
27
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter package for in-app purchase with 5 ready-made subscription UI templates. Handles product loading, purchase, restore, and premium state out of the box for iOS and Android.

Repository (GitHub)
View/report issues

Topics

#iap #in-app-purchase #subscription #paywall #monetization

License

MIT (license)

Dependencies

flutter, flutter_screenutil, flutter_svg, in_app_purchase, in_app_purchase_android, logger, marquee, package_info_plus, shared_preferences, styled_text, url_launcher, vector_graphics

More

Packages that depend on flutter_iap_plus