createTopic method

Future<Topic> createTopic(
  1. String sdkId,
  2. Topic entity
)

Implementation

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