querySystemMessage method
Future<NIMResult<void>>
querySystemMessage(
{ - int offset = 0,
})
Implementation
Future<NIMResult<void>> querySystemMessage({int offset = 0}) {
return ContactRepo.getNotificationList(queryMessageLimit,
offset: offset, systemMessage: lastMessage)
.then((value) {
if (value.isSuccess) {
systemMessages.addAll(value.data ?? []);
if (value.data != null && value.data!.length >= queryMessageLimit) {
haveMore = true;
} else {
haveMore = false;
}
if (value.data != null && value.data!.isNotEmpty) {
lastMessage = value.data!.last;
}
notifyListeners();
}
return value;
});
}