tryDecrypt method

Future<Invoice> tryDecrypt(
  1. String sdkId,
  2. EncryptedInvoice invoice
)

Implementation

Future<Invoice> tryDecrypt(String sdkId, EncryptedInvoice invoice) async {
	final res = await _methodChannel.invokeMethod<String>(
		'InvoiceApi.tryDecrypt',
		{
			"sdkId": sdkId,
			"invoice": jsonEncode(EncryptedInvoice.encode(invoice)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method tryDecrypt");
	final parsedResJson = jsonDecode(res);
	return Invoice.fromJSON(parsedResJson);
}