CSPaginationModel<T> class

A model class for pagination. The model contains a list of data, the current page, the total number of items, the last page, the limit of items per page, and whether there are more pages to load.

Constructors

CSPaginationModel({required List<T>? data, required int? total, required int page, required int? lastPage, required int limit, required bool? hasPrevPage, required bool? hasNextPage})
Creates a CSPaginationModel.
CSPaginationModel.initial()
Creates an initial CSPaginationModel.
factory

Properties

data List<T>?
The list of data to display.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasNextPage bool?
Whether there is a next page.
getter/setter pair
hasPrevPage bool?
Whether there is a previous page.
final
lastPage int?
The last page.
final
limit int
The limit of items per page.
getter/setter pair
page int
The current page.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
total int?
The total number of items.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited