flutter_iap_plus 1.0.0
flutter_iap_plus: ^1.0.0 copied to clipboard
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.initnow acceptsSet<String> productIdsinstead of a singleString productId. The single-product overload is still supported viaproductId:for backward compatibility.PurchasesManager.buy()now accepts an optionalproductIdparameter to pick which product to purchase. When omitted, defaults to the first available product.- Removed public mutable
contextfield. Error dialogs now receive the context fromopenPurchaseScreenautomatically. - Removed dead
purchaseScreenpublic field (was never settable). SharedPreferencespremium key is now scoped perproductId(flutter_iap_plus.premium.<productId>) instead of the hard-codedhasWeeklyPremium. Existing users will appear non-premium after upgrade until restore completes.
New features #
productDurationis now configurable viainit()(default 7 days).- Optional
Loggerinjection viainit(logger: ...). - New
purchaseEventsstream exposing unifiedPurchaseEvents (pending | success | restored | canceled | error). isPremiumnow reads from persisted storage oninit()to avoid race conditions on app cold start.BlocBaseis now exported for direct use.
Fixes #
- Error dialog now actually shows (previously the required
contextfield was never set anywhere in the package). _iapSubscriptionis properly closed ondispose().
Documentation #
- Full dartdoc coverage on the public API.
- New
USAGE.mdwith complete integration guide. - Updated
example/with a clean, minimal sample.
Misc #
- Bumped
flutter_lintsto^5.0.0. - Pinned all dependency versions.
- Added
LICENSE(MIT) and complete pub.flutter-io.cn metadata.