flutter_inapp_purchase 6.0.0-rc.1
flutter_inapp_purchase: ^6.0.0-rc.1 copied to clipboard
In App Purchase plugin for flutter. This project has been forked by react-native-iap and we are willing to share same experience with that on react-native.
flutter_inapp_purchase #
A comprehensive Flutter plugin for implementing in-app purchases on iOS and Android platforms.
π Key Features #
- Cross-platform: Works seamlessly on both iOS and Android
- StoreKit 2 Support: Full StoreKit 2 support for iOS 15.0+ with automatic fallback
- Billing Client v8: Latest Android Billing Client features
- Type-safe: Complete TypeScript-like support with Dart strong typing
- Comprehensive Error Handling: Detailed error codes and user-friendly messages
- Subscription Management: Advanced subscription handling and validation
- Receipt Validation: Built-in receipt validation for both platforms
π¦ Installation #
Add to your pubspec.yaml
:
dependencies:
flutter_inapp_purchase: ^6.0.0-rc.1
π§ Quick Start #
import 'package:flutter_inapp_purchase/flutter_inapp_purchase.dart';
// Initialize connection
await FlutterInappPurchase.instance.initConnection();
// Get products
final products = await FlutterInappPurchase.instance.getProducts(['product_id']);
// Request purchase
await FlutterInappPurchase.instance.requestPurchase(
RequestPurchase(
ios: RequestPurchaseIosProps(sku: 'product_id'),
android: RequestPurchaseAndroidProps(skus: ['product_id']),
),
PurchaseType.inapp,
);
π Documentation #
For comprehensive documentation, guides, API reference, and examples, visit:
π flutter-inapp-purchase.hyo.dev
Quick Links #
- Getting Started - Installation and setup
- Purchase Guide - Complete purchase implementation
- API Reference - Full API documentation
- Examples - Working code examples
- Migration Guide - Upgrading from v5.x
π― Platform Support #
Feature | iOS | Android |
---|---|---|
Products & Subscriptions | β | β |
Purchase Flow | β | β |
Receipt Validation | β | β |
Subscription Management | β | β |
Promotional Offers | β | N/A |
StoreKit 2 | β | N/A |
Billing Client v8 | N/A | β |
π¨ Breaking Changes in v6.0.0-rc.1 #
β οΈ This is a release candidate with significant breaking changes
- ErrorCode enum values changed to lowerCamelCase (e.g.,
E_USER_CANCELLED
βeUserCancelled
) - Channel access changed from static to instance member
- Platform-specific code now uses mixin architecture
See the Migration Guide for detailed upgrade instructions.
π€ Community & Support #
- GitHub Issues: Report bugs and feature requests
- Discussions: Join community discussions
- Stack Overflow: Ask questions
- Slack: Join our community
π§ ProGuard Configuration #
If you have enabled ProGuard, add these rules to your proguard-rules.pro
:
# In app Purchase
-keep class com.amazon.** {*;}
-keep class dev.hyo.** { *; }
-keep class com.android.vending.billing.**
-dontwarn com.amazon.**
-keepattributes *Annotation*
π License #
MIT License - see LICENSE file for details.
β Support #
If this plugin helps you, consider buying me a coffee: