queryPurchaseHistory method

Future<PurchasesHistoryResult> queryPurchaseHistory(
  1. ProductType productType
)

Fetches purchase history for the given ProductType.

Unlike queryPurchases, this makes a network request via Play and returns the most recent purchase for each ProductDetailsWrapper of the given ProductType even if the item is no longer owned.

All purchase information should also be verified manually, with your server if at all possible. See "Verify a purchase".

This wraps BillingClient#queryPurchaseHistoryAsync(QueryPurchaseHistoryParams, PurchaseHistoryResponseListener).

Implementation

Future<PurchasesHistoryResult> queryPurchaseHistory(
    ProductType productType) async {
  return purchaseHistoryResultFromPlatform(
      await _hostApi.queryPurchaseHistoryAsync(
          platformProductTypeFromWrapper(productType)));
}