before method

  1. @override
Future<Page<T, C>> before(
  1. K? key,
  2. C? cursor,
  3. int count
)
override

Fetches the Page before the provided key or cursor.

Implementation

@override
Future<Page<T, C>> before(K? key, C? cursor, int count) async {
  if (reversed) {
    return (await fetch(after: cursor, first: count)).reversed();
  } else {
    return fetch(before: cursor, last: count);
  }
}