Pagination class
Page index and size information for a read request, or a write request if we are caching loaded data to a local Source.
Constructors
- Pagination.cursor(String cursor, {int pageSize = defaultPageSize})
-
Cursor-style pagination.
factory
- Pagination.fromJson(Json data)
-
Deserializes a Pagination object.
factory
- Pagination.page(int page, {int pageSize = defaultPageSize})
-
Page-style pagination.
factory
Properties
- cacheKey → CacheKey
-
Variant of
hashCodewith persistent Ids across application launches.no setter - cursor → String?
-
Cursor-style pagination token. This should indicate the last item of all
loaded data.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- page → int?
-
Page number of this request. Returned data is assumed to skip
"(page - 1) * pageSize" earlier records.
final
- pageSize → int?
-
Maximum number of records this data request should contain.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Json - Serializes this pagination.
-
toParams(
) → Params - Serializes this pagination for use in a request.
-
toString(
) → String - A string representation of this object.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultPageSize → const int
- Default number of records to include in a page.