Skip to main content
Solved

Migrate purchases_flutter versoin 4 to 5

  • September 26, 2023
  • 3 replies
  • 335 views

Forum|alt.badge.img+4

Hello, I'm using RevenueCat on Flutter (purchases_flutter).  
Yesterday Google sent me a mail that the previous PBL version 4 will be deprecated so upgrade to PBL version 5.
My using purchases_flutter version is 4.2.2. So I have to change version to 5.7.0.

But there is no new version of purchases_flutter documentation.

final purchaseInfo = await Purchases.purchaseProduct(REMOVE_ADS_ID);

Previous I used this code. But now how I can fix it?

Best answer by Aziz.cs

You may get the StoreProduct instance first by ID then Purchase it:

List<StoreProduct> productList =

await Purchases.getProducts([productID]);

await Purchases.purchaseStoreProduct(productList.first)

View original
Did this post help you find an answer to your question?

3 replies

Forum|alt.badge.img+2
  • Helper
  • 2 replies
  • Answer
  • September 26, 2023

You may get the StoreProduct instance first by ID then Purchase it:

List<StoreProduct> productList =

await Purchases.getProducts([productID]);

await Purchases.purchaseStoreProduct(productList.first)


Forum|alt.badge.img+1
gony wrote:

Hello, I'm using RevenueCat on Flutter (purchases_flutter).  
Yesterday Google sent me a mail that the previous PBL version 4 will be deprecated so upgrade to PBL version 5.
My using purchases_flutter version is 4.2.2. So I have to change version to 5.7.0.

But there is no new version of purchases_flutter documentation.

final purchaseInfo = await Purchases.purchaseProduct(REMOVE_ADS_ID);

Previous I used this code. But now how I can fix it?

Some solution?


Forum|alt.badge.img+1
Aziz.cs wrote:

You may get the StoreProduct instance first by ID then Purchase it:

List<StoreProduct> productList =

await Purchases.getProducts([productID]);

await Purchases.purchaseStoreProduct(productList.first)

How can I implement this? 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings