LinkFive - Successful Subscriptions
Get Started with Flutter
Get Started with Flutter
Implement our Flutter plugin and easily add subscriptions to your Flutter app.
Add the Plugin to your app
Add linkfive_purchases plugin to your Flutter project:
$ flutter pub add linkfive_purchases
Or open pubspec.yaml and add the dependency to your app:
dependencies: linkfive_purchases: ^3.0.0
Please also checkout our official pub.dev plugin and it's documentation: https://pub.dev/packages/linkfive_purchases
Implementation Guide
We have created separate documentation for each step of your Flutter implementation.
- 1. Initialize Flutter
- 2. Get All Active Subscriptions
- 3. Show your Subscription Offer
- 4. Make a Purchase
Quick overview
Initialize the plugin and listen for updates
You can sign up here and get your api key.
// Get your API key after sign upawait LinkFivePurchases.init("LinkFive Api Key");
Fetch your subscription offering / Fetch your products
LinkFivePurchases.fetchProducts();
// or also
LinkFiveProducts? products = await LinkFivePurchases.fetchProducts();
Listen to your subscription updates:
// Subscriptions to offer to the userLinkFivePurchases.products;
// Active subscriptions the user purchasedLinkFivePurchases.activeProducts;
Make a purchase:
// This handles the entire purchase processLinkFivePurchases.purchase(productDetails);
That's it. We recommend to use the Provider plugin or any other state management systems for Flutter.