getRecentChatListHistoryByTopic static method
Future<void>
getRecentChatListHistoryByTopic({
- required String topicId,
- required bool firstSet,
- int limit = 15,
- required dynamic flyCallback(
- FlyResponse response
Retrieves the recent chat list history by Topic asynchronously.
This method fetches the recent chat list history from the Mirrorfly platform.
You can specify whether it's the first set of data to fetch using firstSet
.
The maximum number of chat items to retrieve is specified by limit
,
with a default value of 15 if not provided.
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 usage:
await Mirrorfly.getRecentChatListHistoryByTopic(
topicId: '',
firstSet: true,
limit: 20,
flyCallback: (response) {
// Handle the response here
if (response.isSuccess && response.hasData) {
}
);
Implementation
// var data = recentChatFromJson(response.data);
// }
/// }
/// );
/// ```
static Future<void> getRecentChatListHistoryByTopic(
{required String topicId,
required bool firstSet,
int limit = 15,
required Function(FlyResponse response) flyCallback}) {
return FlyChatFlutterPlatform.instance.getRecentChatListHistoryByTopic(
topicId: topicId,
firstSet: firstSet,
limit: limit,
callback: flyCallback);
}