CrossmintExportPrivateKeyButton class

Export private key button matching the official Crossmint RN SDK ExportPrivateKeyButton component.

Only renders when wallet.canExportPrivateKey is true (email/phone signers). Returns SizedBox.shrink otherwise.

Headless consumers can supply a childBuilder to swap the Material default button for their own widget while keeping the eligibility check and loading state management. Pure-headless consumers can bypass this widget entirely and call wallet.exportPrivateKey() directly from their own button.

Inheritance

Constructors

CrossmintExportPrivateKeyButton({Key? key, required CrossmintRuntimeWalletBase wallet, VoidCallback? onExported, void onError(Object error)?, CrossmintExportPrivateKeyButtonBuilder? childBuilder})
const

Properties

childBuilder CrossmintExportPrivateKeyButtonBuilder?
Optional builder for the button visual. When null, falls back to the React Native parity Material OutlinedButton with a themed CircularProgressIndicator while the export is in flight. When non-null, the builder is invoked whenever the wallet is eligible to export and receives the current isLoading flag plus an onExport callback that the consumer wires to their own tap target. The onExport callback is null while loading so consumers can disable their button directly without a separate mounted check.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onError → void Function(Object error)?
Called when the export flow throws. Receives the underlying exception so consumers can surface a localized error message.
final
onExported VoidCallback?
Called after the export flow completes successfully.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
wallet CrossmintRuntimeWalletBase
Wallet whose private key will be exported. The button only renders when CrossmintRuntimeWalletBase.canExportPrivateKey is true (email/phone signer wallets).
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CrossmintExportPrivateKeyButton>
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