shareWith method

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

Implementation

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