createMessageInTopic method

Future<DecryptedMessage> createMessageInTopic(
  1. String sdkId,
  2. DecryptedMessage entity
)

Implementation

Future<DecryptedMessage> createMessageInTopic(String sdkId, DecryptedMessage entity) async {
	final res = await _methodChannel.invokeMethod<String>(
		'MessageApi.createMessageInTopic',
		{
			"sdkId": sdkId,
			"entity": jsonEncode(DecryptedMessage.encode(entity)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method createMessageInTopic");
	final parsedResJson = jsonDecode(res);
	return DecryptedMessage.fromJSON(parsedResJson);
}