Page
Generated reference for ovok_sdk: page.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.23+d339d81
Page
class Page<T>One page of a list; autoPaging walks every item from here on, fetching as it goes.
Constructors
Page.new
Page<T>(
List<T> data, {
required int? total,
PageLoader<T>? next,
})A page holding data; next loads the following page and is null on the last.
| Parameter | Type | Kind | Default |
|---|---|---|---|
data | List<T> | positional | |
total | int? | required named | |
next | PageLoader? | named |
Properties
Page.data
final List<T> dataThe items on this page.
Page.total
final int? totalNull when the server does not count the list.
Page.hasMore
bool get hasMoreWhether another page follows this one.
Methods
Page.autoPaging
Stream<T> autoPaging()Emits every item from this page on, loading each following page as the stream reaches it.
A failed page load ends the stream with that OvokException.
Returns Stream<T>.
Last updated on