Skip to main content
The Flutter SDK provides widget-based providers and scopes for integrating wallet functionality into your widget tree. These are optional — the SDK is headless-first and all features can be used directly via controllers.
  1. CrossmintWalletProvider — All-in-one provider (recommended)
  2. CrossmintClientScope — Low-level client scope
  3. CrossmintAuthScope — Low-level auth scope
  4. CrossmintWalletScope — Low-level wallet scope

CrossmintWalletProvider

All-in-one provider that initializes the client, auth, and wallet controller. Handles session restoration, OAuth callback routing, and OTP prompt display automatically. This is the recommended entry point for widget-based apps.

Props

config
CrossmintWalletProviderConfig
required
The configuration this provider was built with.
child
Widget
required
The subtree rendered once dependencies are ready. Pair with [CrossmintWalletGate] to show a loading state until then.

Usage


CrossmintWalletControllerConfig

Configuration for the wallet controller, used by both CrossmintWalletProvider and the headless CrossmintClient.createWalletController().
createOnLogin
CrossmintCreateOnLoginConfig?
When set, the controller automatically creates (or loads) a wallet on the given chain once the user is authenticated. Fill recovery with the recovery signer config (e.g. CrossmintEmailSignerConfig()).
showOtpSignerPrompt
bool
Whether the SDK should surface the default OTP prompt automatically. Set to false to drive OTP UI yourself by listening to [CrossmintWalletController.otp].
callbacks
CrossmintWalletLifecycleCallbacks?
Optional lifecycle hooks — see [CrossmintWalletLifecycleCallbacks].
deviceSignerKeyStorage
DeviceSignerKeyStorage?
Storage adapter used to persist device-signer keys. Defaults to a secure-enclave / keystore-backed implementation on device.

CrossmintClientScope

Low-level scope that provides a CrossmintClient instance to the widget subtree. Access the client from descendant widgets:

Usage


CrossmintAuthScope

Provides the auth client to the widget subtree. Must be nested inside a CrossmintClientScope.

Usage


CrossmintWalletScope

Provides the wallet controller to the widget subtree. Must be nested inside a CrossmintClientScope.

Usage


CrossmintWalletGate

Status-based widget that renders different builders depending on the wallet state. Must be used within a CrossmintWalletProvider or CrossmintWalletScope. All builders receive a CrossmintWalletContextData object, which provides access to the current state, auth client, wallet controller, and actions.

Props

readyBuilder
CrossmintWalletGateBuilder
required
initializingBuilder
CrossmintWalletGateBuilder?
unauthenticatedBuilder
CrossmintWalletGateBuilder?
errorBuilder
CrossmintWalletGateBuilder?

Usage