PaginationMeta class
A class that holds pagination metadata.
Constructors
- PaginationMeta({required int currentPage, required int pageSize, int? total, int? lastPage})
Properties
- currentPage → int
-
The current page number
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNextPage → bool
-
Whether there are more pages after the current one
no setter
- hasPreviousPage → bool
-
Whether there are pages before the current one
no setter
- lastPage → int?
-
The total number of pages (may be null if not provided by API)
final
- nextPage → int?
-
The next page number, or null if there is no next page
no setter
- pageSize → int
-
The number of items per page
final
- previousPage → int?
-
The previous page number, or null if there is no previous page
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- total → int?
-
The total number of items (may be null if not provided by API)
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
Static Methods
-
fromResponse(
Map< String, dynamic> response, {String currentPageKey = 'current_page', String pageSizeKey = 'per_page', String totalKey = 'total', String lastPageKey = 'last_page'}) → PaginationMeta - Creates a PaginationMeta from common API response formats.