> ## 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.

# CrossmintWalletProviderConfig

> Flutter Final Class

**Final Class**

Configuration for `CrossmintWalletProvider`.

```dart theme={null}
final class CrossmintWalletProviderConfig
```

Provide either a `clientConfig` (the provider builds dependencies for
you) or a fully-formed `dependencies` bundle. Both together is invalid.

Most apps want the `clientConfig` path:

```dart theme={null}
CrossmintWalletProvider(
  config: CrossmintWalletProviderConfig(
    clientConfig: CrossmintClientConfig(
      apiKey: 'YOUR_STAGING_API_KEY',
      appScheme: 'com.your.app',
    ),
    walletControllerConfig: CrossmintWalletControllerConfig(
      createOnLogin: CrossmintCreateOnLoginConfig(
        chain: 'base-sepolia',
        recovery: const CrossmintEmailSignerConfig(),
      ),
    ),
  ),
  child: CrossmintWalletGate(...),
);
```

## Constructors

### CrossmintWalletProviderConfig

```dart theme={null}
const CrossmintWalletProviderConfig({
  this.clientConfig,
  this.walletControllerConfig = const CrossmintWalletControllerConfig(),
  this.dependencies,
  this.disposeInjectedDependencies = false,
  this.authLinkProvider,
  this.startAuthCallbackRouter = true,
  this.autoLoadWallet = true,
  this.jwt,
  this.otpPromptBuilder,
  this.mountBridgeHosts = true,
})
```

Creates a provider config. Either `clientConfig` or `dependencies` must be non-null.

## Properties

### clientConfig

```dart theme={null}
final CrossmintClientConfig? clientConfig
```

Config used to build a new `CrossmintClient`. Mutually exclusive with `dependencies`.

### walletControllerConfig

```dart theme={null}
final CrossmintWalletControllerConfig walletControllerConfig
```

Config for the wallet controller the provider creates.

### dependencies

```dart theme={null}
final CrossmintWalletProviderDependencies? dependencies
```

Pre-built dependencies — use this when you want to share a client or controller between mount points. Mutually exclusive with `clientConfig`.

### disposeInjectedDependencies

```dart theme={null}
final bool disposeInjectedDependencies
```

When the provider was handed pre-built dependencies, controls whether they are disposed alongside the provider. Defaults to `false` — the caller retains ownership.

### authLinkProvider

```dart theme={null}
final CrossmintAuthLinkProvider? authLinkProvider
```

Optional resolver for the OAuth callback URL. Leave null to use the default deep-link resolver.

### startAuthCallbackRouter

```dart theme={null}
final bool startAuthCallbackRouter
```

When `true` (default) the provider starts `CrossmintAuthCallbackRouter` automatically so OAuth redirects land correctly.

### autoLoadWallet

```dart theme={null}
final bool autoLoadWallet
```

When `true` (default) the provider triggers `ensureLoaded()` on the wallet controller once a session is detected.

### jwt

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

BYOA JWT — when supplied, the provider seeds `auth.setJwt(jwt)` on startup (Bring Your Own Auth). Apps not using BYOA can leave this null.

### otpPromptBuilder

```dart theme={null}
final CrossmintOtpPromptBuilder? otpPromptBuilder
```

Builder for the default OTP prompt UI — pass `crossmintDefaultOtpPromptBuilder` for the Material default. Leave null to drive OTP UI headlessly via `walletController.otp`.

### mountBridgeHosts

```dart theme={null}
final bool mountBridgeHosts
```

When `true` (default) the provider mounts `CrossmintWalletHost` so the hidden signer bridge has a place to run. Set to `false` only if your subtree already hosts the bridge.

## Methods

### isEquivalentTo

```dart theme={null}
bool isEquivalentTo(CrossmintWalletProviderConfig other)
```
