shareWith method

Future<EncryptedMessage> shareWith(
  1. String sdkId,
  2. String delegateId,
  3. EncryptedMessage message,
  4. MessageShareOptions? options,
)

Implementation

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