launchPurchaseFlow static method
Implementation
static Future<Map> launchPurchaseFlow(
{required String sku, String? payload}) async {
var map =
await _channel.invokeMethod("launchPurchaseFlow", <String, dynamic>{
'sku': sku,
'payload': payload,
});
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,
};
}