How to set up the free trial offer in Flutter and Google Play?
In my Google Play Store Console, I have setup the base plan. I have then setup a trial 7 day offer.
The offer is now separate from the base ID. When I use the base ID for my product offerings, it doesn’t automatically grab the Google Play offer.
How do you implement this, is there a partial example to follow?
From previous post:
I don’t have a full example, but sharing some parts of the code to see if it helps (let me know if it doesn’t).
The flutter repository has a sample app called magic weather with a paywall → https://github.com/RevenueCat/purchases-flutter/blob/main/revenuecat_examples/MagicWeather/lib/src/views/paywall.dart
It gets the store product from the available offering and uses it to render the paywall → https://github.com/RevenueCat/purchases-flutter/blob/main/revenuecat_examples/MagicWeather/lib/src/views/paywall.dart#L67-L79
You can use `final freeOffer = storeProduct.subscriptionOptions?.firstWhere((option) => option.freePhase != null);` to check if there’s a free trial option or not.
Hope it helps ;)
These don’t explicitly tell you how to do the free trial? How to implement this?