With constructor

const With(
  1. String relation, {
  2. List nested = const [],
  3. bool paginate = false,
  4. int? page,
  5. int? perPage,
  6. dynamic query(
    1. QueryBuilderInterface
    )?,
})

A helper class to represent eager loading specifications in a structured way. This class is used to define relations to be loaded with their nested relations and pagination settings. Example usage:

With('posts',
nested: [With('comments'), With('user')],
paginate: true, page: 1, perPage: 10);

Implementation

const With(
  this.relation, {
  this.nested = const [],
  this.paginate = false,
  this.page,
  this.perPage,
  this.query,
});