shareWith method

Future<EncryptedDocument> shareWith(
  1. String sdkId,
  2. String delegateId,
  3. EncryptedDocument document,
  4. DocumentShareOptions? options,
)

Implementation

Future<EncryptedDocument> shareWith(String sdkId, String delegateId, EncryptedDocument document, DocumentShareOptions? options) async {
	final res = await _methodChannel.invokeMethod<String>(
		'DocumentApi.encrypted.shareWith',
		{
			"sdkId": sdkId,
			"delegateId": jsonEncode(delegateId),
			"document": jsonEncode(EncryptedDocument.encode(document)),
			"options": jsonEncode(options == null ? null : DocumentShareOptions.encode(options!)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method shareWith");
	final parsedResJson = jsonDecode(res);
	return EncryptedDocument.fromJSON(parsedResJson);
}