addParticipant method

Future<Topic> addParticipant(
  1. String sdkId,
  2. String entityId,
  3. String dataOwnerId,
  4. TopicRole topicRole,
)

Implementation

Future<Topic> addParticipant(String sdkId, String entityId, String dataOwnerId, TopicRole topicRole) async {
	final res = await _methodChannel.invokeMethod<String>(
		'TopicApi.tryAndRecover.addParticipant',
		{
			"sdkId": sdkId,
			"entityId": jsonEncode(entityId),
			"dataOwnerId": jsonEncode(dataOwnerId),
			"topicRole": jsonEncode(TopicRole.encode(topicRole)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method addParticipant");
	final parsedResJson = jsonDecode(res);
	return Topic.fromJSON(parsedResJson);
}