# Outbox triggers

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

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

## OutboxConnectivity [#outboxconnectivity]

```dart
abstract interface class OutboxConnectivity
```

Tells the outbox when the device regains its network connection, so it sends at once.

### Methods [#methods]

#### OutboxConnectivity.subscribe [#outboxconnectivitysubscribe]

```dart
void Function() subscribe(void Function() onOnline)
```

Calls `onOnline` each time the connection returns; returns a function that stops listening.

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `onOnline` | `void Function()` | positional |  |

Returns `void Function()`.


## OutboxLifecycle [#outboxlifecycle]

```dart
abstract interface class OutboxLifecycle
```

Tells the outbox when the app comes to the foreground, so it sends at once.

### Methods [#methods-1]

#### OutboxLifecycle.subscribe [#outboxlifecyclesubscribe]

```dart
void Function() subscribe(void Function() onForeground)
```

Calls `onForeground` each time the app comes to the foreground; returns a function that stops listening.

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `onForeground` | `void Function()` | positional |  |

Returns `void Function()`.
