addParticipant method

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

Implementation

Future<EncryptedTopic> addParticipant(String sdkId, String entityId, String dataOwnerId, TopicRole topicRole) async {
	final res = await _methodChannel.invokeMethod<String>(
		'TopicApi.encrypted.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 EncryptedTopic.fromJSON(parsedResJson);
}