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