CrossmintWalletProvider class final

Recommended app-facing integration widget — owns client, auth, and wallet-controller lifecycle plus the hidden signer bridge host.

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.

Inheritance

Constructors

CrossmintWalletProvider({Key? key, required CrossmintWalletProviderConfig config, required Widget child})
Creates a provider widget.
const

Properties

child Widget
The subtree rendered once dependencies are ready. Pair with CrossmintWalletGate to show a loading state until then.
final
config CrossmintWalletProviderConfig
The configuration this provider was built with.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CrossmintWalletProvider>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited