toRowList method
Future<List<CursorRow> >
toRowList({
- int? limit,
- int? offset,
- IdbCursorWithValueMatcherFunction? matcher,
Convert an openCursor stream to a list.
Implementation
Future<List<CursorRow>> toRowList({
int? limit,
int? offset,
IdbCursorWithValueMatcherFunction? matcher,
}) {
CursorRow? getRow(CursorWithValue cwv) {
if (matcher != null && !matcher(cwv)) {
return null;
}
var value = cloneValue(cwv.value);
return CursorRow(cwv.key, cwv.primaryKey, value);
}
return _cursorStreamToList(
this,
(cwv) => getRow(cwv),
offset: offset,
limit: limit,
);
}