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