# Ovok

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

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

## Ovok [#ovok]

```dart
class Ovok extends Ovok
```

The `ovok_sdk` client with unsent measurements kept in SQLite, sent when
the network returns and when the app comes to the foreground.

### Constructors [#constructors]

#### Ovok.new [#ovoknew]

```dart
Ovok({
  required String baseUrl,
  required String tenantCode,
  required OvokSecureStore secureStore,
  String fhirPath = 'fhir',
  String? clientId,
  Client? httpClient,
  Duration timeout = const Duration(seconds: 30),
  int maxNetworkRetries = 2,
  UnauthenticatedListener? onUnauthenticated,
  JsContract? jsContract,
  OutboxStore? outboxStore,
  OutboxConnectivity? connectivity,
  OutboxLifecycle? lifecycle,
})
```

Creates a client for `tenantCode` on the Ovok API at `baseUrl`; the
options before `outboxStore` are those of `ovok_sdk`'s `Ovok`.

Unsent measurements wait in the app's SQLite database `ovok-outbox.db`
unless `outboxStore` is given; on the web, which has no SQLite, they wait
in `secureStore`. `connectivity` defaults to connectivity_plus and
`lifecycle` to an `AppLifecycleListener`, which needs the Flutter binding
to be initialized before the client is created.

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `baseUrl` | `String` | required named |  |
| `tenantCode` | `String` | required named |  |
| `secureStore` | `OvokSecureStore` | required named |  |
| `fhirPath` | `String` | named | `'fhir'` |
| `clientId` | `String?` | named |  |
| `httpClient` | `Client?` | named |  |
| `timeout` | `Duration` | named | `const Duration(seconds: 30)` |
| `maxNetworkRetries` | `int` | named | `2` |
| `onUnauthenticated` | `UnauthenticatedListener?` | named |  |
| `jsContract` | `JsContract?` | named |  |
| `outboxStore` | `OutboxStore?` | named |  |
| `connectivity` | `OutboxConnectivity?` | named |  |
| `lifecycle` | `OutboxLifecycle?` | named |  |
