decrypt method

Future<DecryptedDocument> decrypt(
  1. String sdkId,
  2. EncryptedDocument document
)

Implementation

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