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.

Class Reactive controller for checkout order state, matching the official Crossmint RN SDK’s useCrossmintCheckout() hook.
class CrossmintCheckoutController extends ChangeNotifier
Pass this to CrossmintEmbeddedCheckout to receive order updates as observable state instead of (or in addition to) the onOrderUpdated callback.
// Pseudocode: replace `yourCheckoutConfig` with a real
// `CrossmintCheckoutConfig` instance.
final checkoutController = CrossmintCheckoutController();

// In widget tree:
CrossmintEmbeddedCheckout(
  apiKey: 'YOUR_API_KEY',
  config: yourCheckoutConfig,
  checkoutController: checkoutController,
)

// Listen reactively:
ListenableBuilder(
  listenable: checkoutController,
  builder: (context, _) {
    final order = checkoutController.order;
    return Text('Status: ${order?['status']}');
  },
)

Properties

order

Map<String, Object?>? get order
The current order object from the checkout, or null if no order yet.

orderClientSecret

String? get orderClientSecret
The server-assigned client secret for the current order.

Methods

updateOrder

void updateOrder(Map<String, Object?> data)
Updates the order state from a checkout order:updated event.

clear

void clear()
Clears the order state.