PaginationParams constructor
const
PaginationParams(
- {int limit = 10,
- int? offset,
- String? next,
- String? idAround,
- String? greaterThan,
- String? greaterThanOrEqual,
- String? lessThan,
- String? lessThanOrEqual,
- DateTime? createdAtAfterOrEqual,
- DateTime? createdAtAfter,
- DateTime? createdAtBeforeOrEqual,
- DateTime? createdAtBefore,
- 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',
);