shareWith method

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

Implementation

Future<DecryptedDocument> shareWith(String sdkId, String delegateId, DecryptedDocument document, DocumentShareOptions? options) async {
	final res = await _methodChannel.invokeMethod<String>(
		'DocumentApi.shareWith',
		{
			"sdkId": sdkId,
			"delegateId": jsonEncode(delegateId),
			"document": jsonEncode(DecryptedDocument.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 DecryptedDocument.fromJSON(parsedResJson);
}