easy_iap 0.2.0
easy_iap: ^0.2.0 copied to clipboard
Simple and elegant in-app purchase SDK for Flutter. Unified API for iOS App Store and Google Play Store with functional patterns (fold, when) and multi-language support.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased] #
0.2.0 - 2026-01-04 #
Added #
- PriceFormatter - Format prices with currency symbols and localization
format()- Format price with currencyformatSubscription()- Format with period (e.g.,$9.99/month)formatSavings()- Calculate and format savings percentage
- SubscriptionHelpers - Subscription status utilities
SubscriptionStatusenum (active, expiringSoon, expired, gracePeriod)formattedExpiryDate- Human-readable expiry dateformattedTimeRemaining- Time until expirystatusMessage- Status message for displayshouldPromptRenewal- Whether to show renewal prompt
- Documentation
- PATTERNS.md - Copy-paste code patterns for AI
- docs/SETUP.md - iOS/Android setup guide
- CONTRIBUTING.md - Contribution guidelines
Changed #
- Expanded test coverage from 15 to 71 tests
- Improved
IapFailurewith better error code detectionisCancellednow detectsuser_cancelledcodeshouldIgnorenow includesalready_ownedandpendingcanRetrynow includesservice_unavailablerequiresUserActionnow includesnot_signed_in
0.1.1 - 2026-01-04 #
0.1.0 - 2026-01-04 #
Added #
- Initial release
EasyIap- Main class for managing in-app purchasesEasyIap.init()- Factory method for initializationpurchase()- Purchase a productrestore()- Restore previous purchasesisOwned()- Check product ownershiphasSubscription()- Check subscription statushasActiveSubscription- Check if any subscription is active
IapProduct- Product definitionIapProduct.consumable()- Consumable productsIapProduct.nonConsumable()- Non-consumable productsIapProduct.subscription()- Subscription products
IapResult- Purchase result with functional patternsfold()- Handle success/failurewhen()- Handle success/cancelled/failureonSuccess(),onFailure(),onCancelled()- Chaining
IapReceipt- Purchase receipt with verification dataIapFailure- Failure information with smart helpersshouldIgnore- Whether error can be ignoredcanRetry- Whether purchase can be retriedrequiresUserAction- Whether user action needed
IapBuilder- Reactive widget for ownership stateSubscriptionBuilder- Reactive widget for subscription statePurchaseListener- Widget for purchase eventsMockEasyIap- Mock for testingIapLogger- Debug logging with customizable levels