PageInfo<T> class
Information about a page of data from any API
This class represents pagination information that can be extracted from any API response format (offset-based, cursor-based, page-based, etc.).
Constructors
-
PageInfo.new({required List<
T> items, dynamic nextPageKey, bool? isLastPage, int? totalItems}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLast → bool
-
Whether this is the last page (computed property)
no setter
- isLastPage → bool?
-
Whether this is the last page (optional, can be inferred from nextPageKey)
final
-
items
→ List<
T> -
The list of items for the current page
final
- nextPageKey → dynamic
-
The key for the next page (can be page number, offset, cursor, etc.)
If null, indicates this is the last page
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalItems → int?
-
Total number of items (optional, not all APIs provide this)
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