next method
override
Gets the list of next items.
Implementation
@override
Future<List<Poll>> next() async {
sbLog.i(StackTrace.current);
if (isLoading) throw QueryInProgressException();
if (!hasNext) return [];
isLoading = true;
final res = await chat.apiClient.send<PollListQueryResponse>(
PollListGetRequest(
chat,
limit: limit,
channelType: params.channelType,
channelUrl: params.channelUrl,
token: token,
),
);
isLoading = false;
token = res.next;
hasNext = res.next != '';
return res.polls;
}