We would like to offer our users a chance to try our app, which has been developed using the Flutter framework. To achieve this, we are using the Flutter In-App Purchase package to fetch and display subscriptions created in the Google Play Console. We have created free trial offers within the base plans of the auto-renewable subscription, but we are unable to fetch the subscriptions with offers details.
Future<List<ProductDetails>> getProducts() async {
final ProductDetailsResponse response =
await iap.queryProductDetails(productIds);
if (response.notFoundIDs.isNotEmpty) {
print("Not found IDs: ${response.notFoundIDs}");
}
if (response.productDetails.isNotEmpty) {
for (var item in products) {
if (item is GooglePlayProductDetails) {
// Here inside skuDetails, The "freeTrialPeriod" & "introductoryPrice" is empty
SkuDetailsWrapper skuDetails =
(item as GooglePlayProductDetails).skuDetails;
}
}
}
return products;
}
Can someone point me If I'm doing anything wrong?