getAndDecryptSecondaryAttachment method

Future<Uint8List> getAndDecryptSecondaryAttachment(
  1. String sdkId,
  2. Document document,
  3. String key
)

Implementation

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