linkfive_purchases_provider 3.0.1 copy "linkfive_purchases_provider: ^3.0.1" to clipboard
linkfive_purchases_provider: ^3.0.1 copied to clipboard

discontinuedreplaced by: linkfive_purchases
PlatformAndroidiOS

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?

4
likes
130
pub points
50%
popularity

Publisher

verified publisherlinkfive.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

MIT (LICENSE)

Dependencies

flutter, linkfive_purchases, provider

More

Packages that depend on linkfive_purchases_provider