shareWith method

Future<Topic> shareWith(
  1. String sdkId,
  2. String delegateId,
  3. Topic topic,
  4. TopicShareOptions? options,
)

Implementation

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