linkfive_purchases_provider 2.1.3 icon indicating copy to clipboard operation
linkfive_purchases_provider: ^2.1.3 copied to clipboard

linkfive_purchases wrapped in an easy to use Provider. Register the provider and use linkfive everywhere.

LinkFive Provider Plugin #

It wraps linkfive_purchases in an easy to use provider.

Please read our Blogpost Subscriptions in Flutter - The Complete Implementation Guide

or LinkFive Provider Example Documentation

Register the Provider #

Register the Provider with our API key and you're all set to use it.

MultiProvider(
  providers: [
    // ...
    ChangeNotifierProvider(
      create: (context) => LinkFiveProvider("API_KEY"),
      lazy: false,
    ),
  ]
)

Load Products #

Whenever you want to offer your product, call fetchProducts() to load the latest products.

Use the products in your UI: #

Consumer<LinkFiveProvider>(builder: (_, linkFiveProvider, __) {
  // linkFiveProvider.products if you want to show your subscription offer
  // linkFiveProvider.activeProducts if a user purchased a subscription
}

or access in a button tap or in a stateful widget

LinkFiveProvider linkFiveProvider = Provider.of<LinkFiveProvider>(context, listen: false);

That‘s it. Simple enough?

2
likes
140
pub points
51%
popularity

Publisher

verified publisher iconlinkfive.io

linkfive_purchases wrapped in an easy to use Provider. Register the provider and use linkfive everywhere.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter, linkfive_purchases, provider

More

Packages that depend on linkfive_purchases_provider