shareWith method

Future<DecryptedReceipt> shareWith(
  1. String sdkId,
  2. String delegateId,
  3. DecryptedReceipt receipt,
  4. ReceiptShareOptions? options,
)

Implementation

Future<DecryptedReceipt> shareWith(String sdkId, String delegateId, DecryptedReceipt receipt, ReceiptShareOptions? options) async {
	final res = await _methodChannel.invokeMethod<String>(
		'ReceiptApi.shareWith',
		{
			"sdkId": sdkId,
			"delegateId": jsonEncode(delegateId),
			"receipt": jsonEncode(DecryptedReceipt.encode(receipt)),
			"options": jsonEncode(options == null ? null : ReceiptShareOptions.encode(options!)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method shareWith");
	final parsedResJson = jsonDecode(res);
	return DecryptedReceipt.fromJSON(parsedResJson);
}