paginate method

List<DataItem> paginate(
  1. DataPaginate value
)

Implementation

List<DataItem> paginate(DataPaginate value) {
  List<List<DataItem>> data = List<List<DataItem>>.from(chunks(value.size));
  if (value.page < 1) throw "Page ready at 1 to ${data.length}";
  return data[value.page - 1];
}