createMessageInTopic method

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

Implementation

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