flutter_in_app_billing

A Flutter Plugin for google play in app billing

Getting Started

Add this on your app dependencies

    implementation 'com.anjlab.android.iab.v3:library:1.0.44'

Init

Init billing processor before any operation begins

licenseKey your google play license key


  void main() async {
    FlutterInAppBilling.initBp(yourlicenseKey);
    runApp(MyApp());
}

Check purchase/subscribe

productId your google play product id

check if the user had purchased/subscribed

  FlutterInAppBilling.checkPurchase(productId);
  FlutterInAppBilling.checkSubscription(productId);

Purchase/Subscribe

  FlutterInAppBilling.purchase(productId);
  FlutterInAppBilling.subscribe(productId);

Get Purchase Info

  FlutterInAppBilling.getPurchaseInfo(productId);

Libraries

flutter_in_app_billing