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