add method

PaginatedList<T> add({
  1. required Iterable<T> others,
  2. int? page,
  3. int? total,
})

adds items at the end of the current list. You can set the current page or total according to the data source

Implementation

PaginatedList<T> add({
  required Iterable<T> others,
  int? page,
  int? total,
}) {
  return PaginatedList(
    items: [..._items, ...others],
    page: page ?? this.page,
    total: total ?? (this.total)
  );
}