crave_storefront_sdk is the official Dart client for Flutter mobile, web, and desktop storefronts.
It exposes the same reviewed /api/v1/storefront contract as
@craveup/storefront-sdk, with Dart-native models, cancellation,
timeouts, and typed exceptions. It contains no UI, Flutter, or native runtime dependency.
Install the exact release
pubspec.yaml
flutter pub get. Dart-only consumers can run dart pub get instead.
Configure one environment and merchant
StorefrontSessionStore is application-owned. In production, implement it with encrypted platform
storage and isolate records by the supplied API-origin, merchant, and location scope. The included
InMemoryStorefrontSessionStore is only for tests and ephemeral demos. Keep customer JWTs in your
authentication layer, not in the cart session store.
Check ordering readiness
Check availability before presenting an ordering action. This anonymous GET does not create a cart:Handle typed failures
CART_CONFLICT, re-read the cart,
reconcile the new revision, and let the shopper confirm the next mutation.
Close the client when its application-level owner is disposed:
Build a Flutter storefront
Install the package, configure secure session storage, load a menu, and start an order.