setRawSecondaryAttachment method
Implementation
Future<EncryptedDocument> setRawSecondaryAttachment(String sdkId, String documentId, String key, String rev, List<String>? utis, Uint8List attachment, bool encrypted) async {
final res = await _methodChannel.invokeMethod<String>(
'DocumentBasicApi.setRawSecondaryAttachment',
{
"sdkId": sdkId,
"documentId": jsonEncode(documentId),
"key": jsonEncode(key),
"rev": jsonEncode(rev),
"utis": jsonEncode(utis?.map((x0) => x0).toList()),
"attachment": jsonEncode(base64Encode(attachment as List<int>)),
"encrypted": jsonEncode(encrypted),
}
);
if (res == null) throw AssertionError("received null result from platform method setRawSecondaryAttachment");
final parsedResJson = jsonDecode(res);
return EncryptedDocument.fromJSON(parsedResJson);
}