shareWith method

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

Implementation

Future<Message> shareWith(String sdkId, String delegateId, Message message, MessageShareOptions? options) async {
	final res = await _methodChannel.invokeMethod<String>(
		'MessageApi.tryAndRecover.shareWith',
		{
			"sdkId": sdkId,
			"delegateId": jsonEncode(delegateId),
			"message": jsonEncode(Message.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 Message.fromJSON(parsedResJson);
}