# Page

Canonical page: https://docs.ovok.com/flutter-sdk/reference/ovok_sdk/page

{/* Generated by scripts/generate_reference.dart; do not edit. */}

## Page [#page]

```dart
class Page<T>
```

One page of a list; [`autoPaging`](#pageautopaging) walks every item from here on, fetching as it goes.

### Constructors [#constructors]

#### Page.new [#pagenew]

```dart
Page<T>(
  List<T> data, {
  required int? total,
  PageLoader<T>? next,
})
```

A page holding [`data`](#pagedata); `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 [#properties]

#### Page.data [#pagedata]

```dart
final List<T> data
```

The items on this page.

#### Page.total [#pagetotal]

```dart
final int? total
```

Null when the server does not count the list.

#### Page.hasMore [#pagehasmore]

```dart
bool get hasMore
```

Whether another page follows this one.

### Methods [#methods]

#### Page.autoPaging [#pageautopaging]

```dart
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>`.
