> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CrossmintIdentityVerification

> Flutter Class

**Class**

Renders Crossmint's hosted identity verification step in a WebView.

```dart theme={null}
class CrossmintIdentityVerification extends StatefulWidget
```

Read-only: the hosted page reports lifecycle events and nothing is sent
back to it.

```dart theme={null}
CrossmintIdentityVerification(
  apiKey: 'YOUR_API_KEY',
  credentials: checkoutController.identityVerificationCredentials!,
  onComplete: (status) => print('verification: $status'),
)
```

## Constructors

### CrossmintIdentityVerification

```dart theme={null}
const CrossmintIdentityVerification({
  super.key,
  required this.apiKey,
  required this.credentials,
  this.locale,
  this.onReady,
  this.onComplete,
  this.onCancel,
  this.onError,
  this.loadingBuilder,
  this.defaultHeight = 300,
})
```

## Properties

### apiKey

```dart theme={null}
final String apiKey
```

Crossmint API key. Resolves staging versus production and is forwarded to the hosted page, matching the React Native SDK and the other Crossmint widgets in this package.

### credentials

```dart theme={null}
final CrossmintIdentityVerificationCredentials credentials
```

Credentials for the verification session.

### locale

```dart theme={null}
final String? locale
```

Optional locale tag. Must be one the hosted page recognises, for example `en-US`, `es-ES`, `pt-PT`. An unrecognised tag is not ignored: the page rejects it and reports a non-retriable `invalidConfiguration` error, which leaves the buyer with a dead screen.

### onReady

```dart theme={null}
final void Function()? onReady
```

Called when the verification UI is ready.

### onComplete

```dart theme={null}
final void Function(CrossmintIdentityVerificationStatus status)? onComplete
```

Called with the outcome when verification finishes.

### onCancel

```dart theme={null}
final void Function()? onCancel
```

Called when the buyer abandons verification.

### onError

```dart theme={null}
final void Function(CrossmintIdentityVerificationError error)? onError
```

Called when verification cannot run or continue.

### loadingBuilder

```dart theme={null}
final CrossmintIdentityVerificationLoadingBuilder? loadingBuilder
```

Optional builder for the loading overlay. Falls back to a themed Material spinner, matching `CrossmintPaymentMethodManagement`.

### defaultHeight

```dart theme={null}
final double defaultHeight
```

Initial height before the hosted page reports its actual height.

## Methods

### createState

```dart theme={null}
State<CrossmintIdentityVerification> createState()
```
