Skip to content

5. Get all purchased or subscribed products

Iman khoshabi edited this page May 27, 2021 · 2 revisions

Get all purchased products of the user (products in user's inventory) using below code:

/// To get the purchased products
List<PurchaseInfo> purchasedProductsList = await FlutterPoolakey.getAllPurchasedProducts()

/// To get the subscribed products
List<PurchaseInfo> purchasedProductsList = await FlutterPoolakey.getAllSubscribedProducts()

It returns an empty list if doesn't find any product otherwise it returns a list of PurchaseInfo.

It throws a PlatformException with a stacktrace if any error happenss. You must handle the error with your logic.

Clone this wiki locally