PaginationMode enum

How the server addresses the page after this one.

Decided from the response rather than configured by the caller, so one paginator serves an endpoint that changes its mind, and a consumer does not have to restate a decision the backend already made.

Inheritance
Available extensions

Values

cursor → const PaginationMode

Laravel cursorPaginate(): the next page is a token the server minted.

offset → const PaginationMode

Laravel paginate(): the next page is current_page + 1.

single → const PaginationMode

A bare collection with no meta block. One page, and it has arrived.

fetcher → const PaginationMode

The pages come from a MagicPageFetcher, so how they are addressed is the fetcher's business and this paginator does not know.

Reported instead of guessing one of the three above: a fetcher's source might page by token, by number, or not at all, and claiming cursor for all of them would make MagicPaginator.mode say something untrue.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Constants

values → const List<PaginationMode>
A constant List of the values in this enum, in order of their declaration.