setPagination method

dynamic setPagination(
  1. int page, {
  2. String? paramPage,
  3. String? paramPerPage,
  4. String? perPage,
})
inherited

Apply a pagination query to the HTTP request

Implementation

setPagination(int page,
    {String? paramPage, String? paramPerPage, String? perPage}) {
  Map<String, dynamic> query = {(paramPage ?? "page"): page};
  if (perPage != null) {
    query.addAll({(paramPerPage ?? "per_page"): perPage});
  }
  _api.options.queryParameters.addAll(query);
}