createTopic static method
Future<void>
createTopic({
- required String topicName,
- List<
TopicMetaData> metaData = const [], - required dynamic flyCallBack(
- FlyResponse response
Creates a new topic with the specified name and optional metadata.
Parameters:
-
The
topicName
parameter is required and represents the name of the topic to be created. -
The
metaData
parameter is optional and represents additional metadata associated with the topic.
Returns a Future that completes with a String representing the unique identifier of the created topic.
Throws an error if the creation of the topic fails.
Implementation
static Future<void> createTopic(
{required String topicName,
List<TopicMetaData> metaData = const [],
required Function(FlyResponse response) flyCallBack}) async {
return FlyChatFlutterPlatform.instance.createTopic(
topicName: topicName, metaData: metaData, callback: flyCallBack);
}