next method
override
Gets the list of next items.
Implementation
@override
Future<List<BaseMessage>> next() async {
sbLog.i(StackTrace.current);
if (isLoading) throw QueryInProgressException();
if (!hasNext) return [];
isLoading = true;
final res = await chat.apiClient.send<ScheduledMessageResponse>(
GroupChannelScheduledMessageListGetRequest(
chat,
limit: limit,
channelUrl: params?.channelUrl,
reverse: params?.reverse,
status: params?.scheduledStatus,
messageType: params?.messageTypeFilter,
order: params?.order,
token: token,
),
);
isLoading = false;
token = res.next;
hasNext = res.next != '';
return res.scheduledMessages;
}