getWholeCollection method
Future<Result<int, String, List<T> > >
getWholeCollection({
- List<
DataFilter> ? subCollectionQuery, - int limit = 1000,
- String channel = 'main',
- CrudStrategy strategy = const DefaultCrudStrategy(),
override
Implementation
@override
Future<Result<int, String, List<T>>> getWholeCollection({
List<DataFilter>? subCollectionQuery,
int limit = 1000,
String channel = 'main',
CrudStrategy strategy = const DefaultCrudStrategy(),
}) async {
final res = await _crud.getWholeCollection(
currentCount: _currentList(channel).length,
subCollectionQuery: subCollectionQuery,
limit: limit,
);
if (res.code == 0) {
final items = res.data!;
_getItemsStream(channel).add(items);
return res;
} else {
final items = _currentList(channel);
_getItemsStream(channel).add(items);
return _listResult(items);
}
}