limitOffsetStream method
Stream<CursorRow>
limitOffsetStream({
- int? limit,
- int? offset,
- IdbCursorWithValueMatcherFunction? matcher,
filter out.
Implementation
Stream<CursorRow> limitOffsetStream({
int? limit,
int? offset,
IdbCursorWithValueMatcherFunction? matcher,
}) {
if (matcher == null) {
return _cursorApplyLimitOffset(
this,
offset: offset,
limit: limit,
).map(_cwvToRow);
}
CursorRow? checkAndConvertRow(CursorWithValue cwv) {
if (!matcher(cwv)) {
return null;
}
return _cwvToRow(cwv);
}
return _cursorApplyFilterLimitOffset(
this,
checkAndConvertRow,
offset: offset,
limit: limit,
);
}