queryProductDetails method

Future<ProductDetails?> queryProductDetails(
  1. String productId
)

Implementation

Future<ProductDetails?> queryProductDetails(String productId) async {
  if (_isStoreAvailable && _products == null) {
    final response = await _iapService.queryProductDetails({productId});

    if (response.error != null) {
      throw response.error!;
    }

    return getProductDetails(response.productDetails, productId);
  }

  return getProductDetails(_products, productId);
}