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