Skip to main content
Answer

Retrieve packages/products on web for Flutter app

  • January 20, 2022
  • 2 replies
  • 218 views

Forum|alt.badge.img+3

I’m developing an application that should run both on platforms (iOS and Android) and web.

So far I have been able to implement the platform part of logic, being able to retrieve products and packages therefore displaying the items on a crafted layout and it calls to purchase correctly.

Now I want to do it on the web/stripe side and I can’t find any information on how to retireve the products for web from RevenueCat.

I’m trying with a code like ths but without any success on the web

await Purchases.setDebugLogsEnabled(true);
if (GetPlatform.isAndroid) {
await Purchases.setup(Environment.publicAndroidRCSDKKey,
appUserId: boxStorage.read('userId'));
} else if (GetPlatform.isIOS) {
await Purchases.setup(Environment.publiciOsRCSDKKey,
appUserId: boxStorage.read('userId'));
} else if (GetPlatform.isWeb) {
await Purchases.setup(Environment.publicStripeRCSDKKey);
}
try {
Offerings offerings = await Purchases.getOfferings();

 

Best answer by taskntime

Thanks

This post has been closed for comments

2 replies

tina
RevenueCat Staff
Forum|alt.badge.img+10
  • RevenueCat Staff
  • January 22, 2022

Hey @taskntime 

I just replied to a similar Flutter Web question here:

 


Forum|alt.badge.img+3
  • Author
  • Helper
  • Answer
  • January 22, 2022

Thanks