Skip to main content

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.

Final Class Recommended app-facing integration widget — owns client, auth, and wallet-controller lifecycle plus the hidden signer bridge host.
final class CrossmintWalletProvider extends StatefulWidget
Wrap your app tree in this widget, pass a CrossmintWalletProviderConfig with API key and an optional CrossmintWalletControllerConfig.createOnLogin, and use CrossmintWalletGate to render UI based on wallet lifecycle. Behind the scenes this widget:
  1. Constructs a CrossmintClient and CrossmintWalletController from config.
  2. Mounts CrossmintClientScope, CrossmintAuthScope, and CrossmintWalletScope so descendants can resolve them via CrossmintWalletContext.of.
  3. Mounts CrossmintWalletHost — which in turn hosts the hidden signer WebView — unless CrossmintWalletProviderConfig.mountBridgeHosts is explicitly set to false.
  4. Calls restoreSession() so any persisted JWT is applied before the first frame.
If you need more control over construction or want to share a client across surfaces, use CrossmintWalletHost with your own pre-built CrossmintClient + CrossmintWalletController instead.

Constructors

CrossmintWalletProvider

const CrossmintWalletProvider({
  super.key,
  required this.config,
  required this.child,
})
Creates a provider widget.

Properties

config

final CrossmintWalletProviderConfig config
The configuration this provider was built with.

child

final Widget child
The subtree rendered once dependencies are ready. Pair with CrossmintWalletGate to show a loading state until then.

Methods

createState

State<CrossmintWalletProvider> createState()