createMessageInTopic method

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

Implementation

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