hyochan/flutter_inapp_purchase

How to obtain free trial period on android after migration on android billing v5?

Closed this issue · 2 comments

Version of flutter_inapp_purchase

5.4.2

Platforms you faced the error (IOS or Android or both?)

android

Expected behavior

I should be able to access IAPItem.freeTrialPeriodAndroid or similar api

Actual behavior

i'm unable to find expected field, getter or helper method

Tested environment (Emulator? Real Device?)

android device

Steps to reproduce the behavior

Try to migrate code using IAPItem.freeTrialPeriodAndroid from 5.3.1 to 5.4.2

Hey, closing as seems i found it by myself, hope it will be useful for someone else: just navigate subscriptionOffers.pricingPhases.billingPeriod field where subscriptionOffer.offerId == "freetrial"

@nickzutobicom I cannot find it, could you please show the detailed code?

Screenshot 2024-02-11 at 00 04 47