Page<T> class
abstract
Data structure to help paginating (e.g. cursor- or next-token-driven) API calls.
- Implementers
Constructors
- Page.empty()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLast → bool
-
Whether this is the last page, or there may be more pages. There is no
guarantee that the next page will contain items.
no setter
-
items
→ List<
T> -
The items of the return page, may be less than the requested limit.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
asIterator(
) → StreamIterator< T> - Transform the page and returns an iterator that can go through it asynchronously.
-
asStream(
) → Stream< T> - Transform the page to a stream of items.
-
close(
) → Future< void> - Closes the page and associated resources.
-
map<
R> (FutureOr< R> fn(T item)) → Future<Page< R> > - Maps the type of the items to a different type. The same mapper function will be called on subsequent pages.
-
mapItems<
R> (FutureOr< List< fn(List<R> >T> items)) → Future<Page< R> > - Maps the type of the items to a different type. The same mapper function will be called on subsequent pages.
-
next(
) → Future< Page< T> > - Returns the next page.
-
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