Pagination class

A class representing pagination logic for data retrieval.

Constructors

Pagination.new({int? skip, int? take})
Constructor for creating a Pagination object.

Properties

hashCode int
The hash code for this object.
no setterinherited
page int
Calculate the current page based on skip and take values.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skip int
getter/setter pair
take int
getter/setter pair

Methods

decrement() → void
Decrements the skip value by the number of items to take, ensuring it doesn't go negative.
increment() → void
Increments the skip value by the number of items to take.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Resets the pagination values to their initial state.
toJson() Map<String, dynamic>
Converts the current pagination state to a JSON format.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

configuration PaginationConfiguration
Configuration for pagination settings, can be modified globally.
getter/setter pair