consume static method

Future<Map> consume({
  1. required Purchase purchase,
})

Implementation

static Future<Map> consume({required Purchase purchase}) async {
  var map = await _channel.invokeMethod("consume", <String, dynamic>{
    'purchase': json.encode(purchase.toJson()),
  });
  var purchaseJson = json.decode(map["purchase"]);
  var resultJson = json.decode(map["result"]);
  return {
    RESULT: resultJson != null ? IabResult.fromJson(resultJson) : null,
    PURCHASE: purchaseJson != null ? Purchase.fromJson(purchaseJson) : null,
  };
}