setRawMainAttachment method
Implementation
Future<EncryptedDocument> setRawMainAttachment(String sdkId, String documentId, String rev, List<String>? utis, Uint8List attachment, bool encrypted) async {
final res = await _methodChannel.invokeMethod<String>(
'DocumentBasicApi.setRawMainAttachment',
{
"sdkId": sdkId,
"documentId": jsonEncode(documentId),
"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 setRawMainAttachment");
final parsedResJson = jsonDecode(res);
return EncryptedDocument.fromJSON(parsedResJson);
}