queryChannelsOffline method
Future<List<Channel> >
queryChannelsOffline({
- Filter? filter,
- List<
SortOption< ? channelStateSort,ChannelState> > - PaginationParams paginationParams = const PaginationParams(),
Requests channels with a given query from the Persistence client.
Implementation
Future<List<Channel>> queryChannelsOffline({
Filter? filter,
List<SortOption<ChannelState>>? channelStateSort,
PaginationParams paginationParams = const PaginationParams(),
}) async {
final offlineChannels = (await chatPersistenceClient?.getChannelStates(
filter: filter,
channelStateSort: channelStateSort,
paginationParams: paginationParams,
)) ??
[];
final updatedData = _mapChannelStateToChannel(offlineChannels);
state.addChannels(updatedData.key);
return updatedData.value;
}