# Profile form

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

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

## ProfileForm [#profileform]

```dart
class ProfileForm extends StatefulWidget
```

Loads and updates the signed-in patient's configured FHIR fields.

### Constructors [#constructors]

#### ProfileForm.new [#profileformnew]

```dart
ProfileForm({
  required Ovok ovok,
  required List<ProfileFormField> fields,
  AuthTranslations translations = defaultAuthTranslations,
  Future<void> Function(Map<String, dynamic>, Map<String, String>)? onSuccess,
  void Function(Object)? onError,
  Key? key,
})
```

Creates a patient profile form for [`fields`](#profileformfields).

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `ovok` | `Ovok` | required named |  |
| `fields` | `List<ProfileFormField>` | required named |  |
| `translations` | `AuthTranslations` | named | `defaultAuthTranslations` |
| `onSuccess` | `Future<void> Function(Map<String, dynamic>, Map<String, String>)?` | named |  |
| `onError` | `void Function(Object)?` | named |  |
| `key` | `Key?` | named |  |

### Properties [#properties]

#### ProfileForm.ovok [#profileformovok]

```dart
final Ovok ovok
```

The client used to read and update the profile.

#### ProfileForm.fields [#profileformfields]

```dart
final List<ProfileFormField> fields
```

The Patient fields to display and save.

#### ProfileForm.translations [#profileformtranslations]

```dart
final AuthTranslations translations
```

Labels to use for this form.

#### ProfileForm.onSuccess [#profileformonsuccess]

```dart
final Future<void> Function(Map<String, dynamic>, Map<String, String>)? onSuccess
```

Called after the server saves the profile and edited values.

#### ProfileForm.onError [#profileformonerror]

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

Called when loading or saving fails.


## ProfileFormField [#profileformfield]

```dart
class ProfileFormField
```

A text field in [`ProfileForm`](#profileform), addressed by its FHIR JSON Pointer path.

### Constructors [#constructors-1]

#### ProfileFormField.new [#profileformfieldnew]

```dart
ProfileFormField({
  required String path,
  required String label,
  TextInputType keyboardType = TextInputType.text,
})
```

Creates a field such as `/name/0/given/0`.

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `path` | `String` | required named |  |
| `label` | `String` | required named |  |
| `keyboardType` | `TextInputType` | named | `TextInputType.text` |

### Properties [#properties-1]

#### ProfileFormField.path [#profileformfieldpath]

```dart
final String path
```

The JSON Pointer path in a FHIR Patient resource.

#### ProfileFormField.label [#profileformfieldlabel]

```dart
final String label
```

The visible field label.

#### ProfileFormField.keyboardType [#profileformfieldkeyboardtype]

```dart
final TextInputType keyboardType
```

The keyboard used to edit the value.
