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.

ParameterTypeKindDefault
dataList<T>positional
totalint?required named
nextPageLoader?named

Properties

Page.data

final List<T> data

The items on this page.

Page.total

final int? total

Null when the server does not count the list.

Page.hasMore

bool get hasMore

Whether 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

On this page