NanoOffsetPagination class
Page and limit based pagination strategy (Offset-based).
- Implemented types
Constructors
- NanoOffsetPagination({int page = 1, int pageSize = 20, String pageKey = 'page', String sizeKey = 'pageSize'})
-
Creates a NanoOffsetPagination instance.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- page → int
-
The current page number (1-based index).
final
- pageKey → String
-
The query parameter key for the page number (e.g.
page,page_number).final - pageSize → int
-
The number of items to return per page.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sizeKey → String
-
The query parameter key for the page size (e.g.
pageSize,limit).final
Methods
-
copyWith(
{int? page, int? pageSize, String? pageKey, String? sizeKey}) → NanoOffsetPagination - Creates a copy of this pagination with modified properties.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toQueryParams(
) → Map< String, dynamic> -
Converts the pagination parameters into URL query parameters.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited