getTopics static method
Future<void>
getTopics({
- required List<
String> topicIds, - required dynamic flyCallBack(
- FlyResponse response
Retrieves topics from the Mirrorfly platform.
This method asynchronously retrieves topics from the Mirrorfly platform
based on the provided list of topicIds
.
The flyCallBack
parameter is a function that will be called upon completion of the operation.
It receives a FlyResponse object as a parameter, which contains information about the success or failure of the operation.
Example:
await Mirrorfly.getTopics(topicIds: "c47cdeec-32a0-4abb-a318-ab60048df577"
,flyCallBack: (response){
if(response.isSuccess && response.hasData){
var topics = topicsFromJson(response.data);
}
});
Implementation
static Future<void> getTopics(
{required List<String> topicIds,
required Function(FlyResponse response) flyCallBack}) async {
return FlyChatFlutterPlatform.instance
.getTopics(topicIds: topicIds, callback: flyCallBack);
}