-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getOffering returns null #19
Comments
Hey! Just released https://github.com/RevenueCat/purchases-flutter/releases/tag/1.0.4 which should fix it. That was a really stupid bug on our end, sorry about that @owenkealey |
thanks |
@vegaro Still experiencing this on android.
Flutter doctor:
|
Hi @lvlrSajjad. You're most likely facing a testing configuration issue. I would suggest you to look at this answer in our FAQs https://support.revenuecat.com/hc/en-us/articles/360041793174-Why-are-my-products-offerings-or-available-packages-empty- and at this article https://docs.revenuecat.com/docs/google-play-store. I hope there's something in those articles that fixes your issue 😄 We have a Spectrum community https://spectrum.chat/revenuecat that might be helpful if you have more configuration issues in the future |
if you have multiple environments make sure your running on your live environment in debug mode (live bundle id). |
@vegaro It was helpful thanks but spectrum chat is inactive no one replies there. |
Hi,
When I print out all the offerings I have, you can see the offerings particularly the one identified by the string "Default".
Offerings{current: Offering{identifier: Default, serverDescription: Subscription options., availablePackages: [Package{identifier: $rc_monthly, packageType: PackageType.monthly, product: Product{identifier: com.phntm.carbon.subscription, description: The subscription is required to access Carbon, title: Full Access, price: 11.989999771118164, priceString: $11.99, currencyCode: USD, introductoryPrice: null}, offeringIdentifier: Default}], lifetime: null, annual: null, sixMonth: null, threeMonth: null, twoMonth: null, monthly: Package{identifier: $rc_monthly, packageType: PackageType.monthly, product: Product{identifier: com.phntm.carbon.subscription, description: The subscription is required to access Carbon, title: Full Access, price: 11.989999771118164, priceString: $11.99, currencyCode: USD, introductoryPrice: null}, offeringIdentifier: Default}, weekly: null}, all: {Default: Offering{identifier: Default, serverDescription: Subscription options., availablePackages: [Package{identifie<…>
However, when I call the
getOffering
method on this,print(offerings.getOffering("Default"));
it prints out
null
and because of this when I try to get the Offering's package like this,Package package = offerings.getOffering("Default").availablePackages[0];
it does not work, error
Unhandled Exception: NoSuchMethodError: The getter 'availablePackages' was called on null.
The text was updated successfully, but these errors were encountered: