garage_auth, garage_entitlements, garage_iap and garage_ui, moved out of Garage-Services and Metro-Map-Maker into one public repo. MIT, one readme, docs under docs/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013F4NWNvYcdeSgqbWMT1VQ7
26 lines
917 B
Dart
26 lines
917 B
Dart
// In-app purchasing for Garage apps — layered on garage_auth.
|
|
//
|
|
// Hand it a signed-in GarageAuth and the store API base url; it lists the app's
|
|
// products, runs both purchase modes (embedded Stripe sheet + browser handoff),
|
|
// and keeps a short-lived signed licence you can verify offline.
|
|
//
|
|
// final iap = GarageIap(auth: auth, appSlug: "my-app",
|
|
// apiBaseUrl: "https://store.imbenji.net/api");
|
|
// final products = await iap.products();
|
|
// await iap.purchase(products.first, mode: PurchaseMode.sheet);
|
|
// final pro = iap.has("pro");
|
|
library;
|
|
|
|
export "src/garage_iap.dart" show GarageIap;
|
|
export "src/models.dart"
|
|
show
|
|
GarageProduct,
|
|
GarageEntitlement,
|
|
GarageLicence,
|
|
LicenceProduct,
|
|
PurchaseMode,
|
|
PurchaseOutcome,
|
|
IapError;
|
|
export "src/licence_cache.dart"
|
|
show LicenceCache, SecureLicenceCache, MemoryLicenceCache, CachedLicence;
|