# Account actions

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

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

## DeleteAccountButton [#deleteaccountbutton]

```dart
class DeleteAccountButton extends StatefulWidget
```

Confirms and schedules account deletion without wiping health data.

### Constructors [#constructors]

#### DeleteAccountButton.new [#deleteaccountbuttonnew]

```dart
DeleteAccountButton({
  required Ovok ovok,
  AuthTranslations translations = defaultAuthTranslations,
  VoidCallback? onSuccess,
  void Function(Object)? onError,
  Key? key,
})
```

Creates a button that schedules deletion after 30 days.

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `ovok` | `Ovok` | required named |  |
| `translations` | `AuthTranslations` | named | `defaultAuthTranslations` |
| `onSuccess` | `VoidCallback?` | named |  |
| `onError` | `void Function(Object)?` | named |  |
| `key` | `Key?` | named |  |

### Properties [#properties]

#### DeleteAccountButton.ovok [#deleteaccountbuttonovok]

```dart
final Ovok ovok
```

The client used to schedule deletion.

#### DeleteAccountButton.translations [#deleteaccountbuttontranslations]

```dart
final AuthTranslations translations
```

Labels to use for this button and its confirmation dialog.

#### DeleteAccountButton.onSuccess [#deleteaccountbuttononsuccess]

```dart
final VoidCallback? onSuccess
```

Called after deletion has been scheduled.

#### DeleteAccountButton.onError [#deleteaccountbuttononerror]

```dart
final void Function(Object)? onError
```

Called when the deletion request fails.


## LogoutButton [#logoutbutton]

```dart
class LogoutButton extends StatefulWidget
```

Signs out the current session and clears it from the secure store.

### Constructors [#constructors-1]

#### LogoutButton.new [#logoutbuttonnew]

```dart
LogoutButton({
  required Ovok ovok,
  AuthTranslations translations = defaultAuthTranslations,
  VoidCallback? onSuccess,
  void Function(Object)? onError,
  Key? key,
})
```

Creates a button that signs out through [`ovok`](#logoutbuttonovok).

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `ovok` | `Ovok` | required named |  |
| `translations` | `AuthTranslations` | named | `defaultAuthTranslations` |
| `onSuccess` | `VoidCallback?` | named |  |
| `onError` | `void Function(Object)?` | named |  |
| `key` | `Key?` | named |  |

### Properties [#properties-1]

#### LogoutButton.ovok [#logoutbuttonovok]

```dart
final Ovok ovok
```

The client used to sign out.

#### LogoutButton.translations [#logoutbuttontranslations]

```dart
final AuthTranslations translations
```

Labels to use for this button.

#### LogoutButton.onSuccess [#logoutbuttononsuccess]

```dart
final VoidCallback? onSuccess
```

Called after the local session has been cleared.

#### LogoutButton.onError [#logoutbuttononerror]

```dart
final void Function(Object)? onError
```

Called when sign-out fails on the server.
