PaginationParams constructor

const PaginationParams({
  1. int limit = 10,
  2. int? offset,
  3. String? next,
  4. String? idAround,
  5. String? greaterThan,
  6. String? greaterThanOrEqual,
  7. String? lessThan,
  8. String? lessThanOrEqual,
  9. DateTime? createdAtAfterOrEqual,
  10. DateTime? createdAtAfter,
  11. DateTime? createdAtBeforeOrEqual,
  12. DateTime? createdAtBefore,
  13. DateTime? createdAtAround,
})

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.offset,
  this.next,
  this.idAround,
  this.greaterThan,
  this.greaterThanOrEqual,
  this.lessThan,
  this.lessThanOrEqual,
  this.createdAtAfterOrEqual,
  this.createdAtAfter,
  this.createdAtBeforeOrEqual,
  this.createdAtBefore,
  this.createdAtAround,
}) : assert(
        offset == null || offset == 0 || next == null,
        'Cannot specify non-zero `offset` with `next` parameter',
      );