linkfive_purchases_provider 2.0.0-dev.3 linkfive_purchases_provider: ^2.0.0-dev.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
All you need to do:
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,
),
]
)
And then integrate your UI:
Consumer<LinkFiveProvider>(builder: (_, linkFiveProvider, __) {
// linkFiveProvider.products if you want to show your subscription offer
// linkFiveProvider.activeProducts if a user purchased a subscription
}
That‘s it. Simple enough?