PaginationParams constructor

const PaginationParams({
  1. int limit = 10,
  2. int before = 10,
  3. int after = 10,
  4. int? offset,
  5. String? next,
  6. String? idAround,
  7. String? greaterThan,
  8. String? greaterThanOrEqual,
  9. String? lessThan,
  10. String? lessThanOrEqual,
})

Creates a new PaginationParams instance

For example:

// limit to 50
final paginationParams = PaginationParams(limit: 50);

// limit to 50 with offset
final paginationParams = PaginationParams(limit: 50, offset: 50);

Implementation

const PaginationParams({
  this.limit = 10,
  this.before = 10,
  this.after = 10,
  this.offset,
  this.next,
  this.idAround,
  this.greaterThan,
  this.greaterThanOrEqual,
  this.lessThan,
  this.lessThanOrEqual,
}) : assert(
        offset == null || offset == 0 || next == null,
        'Cannot specify non-zero `offset` with `next` parameter',
      );