dooboolab-community / flutter_inapp_purchase

(Sun Rised!) Flutter plugin for In App Purchase.
MIT License
549 stars 236 forks source link

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

Closed nickzutobicom closed 1 year ago

nickzutobicom commented 1 year ago

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

nickzutobicom commented 1 year ago

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"

RomanSoviak commented 6 months ago

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

Screenshot 2024-02-11 at 00 04 47