MethodChannelZeroSettle class

An implementation of ZeroSettlePlatform that uses method channels.

Inheritance

Constructors

MethodChannelZeroSettle()

Properties

applePayStateEventChannel EventChannel
final
applePayStateUpdates Stream<String>
Stream of Apple Pay availability state changes from the iOS Kit's applePayAvailability.statePublisher. Each event is the raw string ("ready" / "setupRequired" / "unavailable"); the facade converts to ApplePayAvailabilityState.
no setteroverride
checkoutEventChannel EventChannel
final
checkoutEvents Stream<Map<String, dynamic>>
no setteroverride
currentUserIdEventChannel EventChannel
final
currentUserIdUpdates Stream<String?>
Stream of the currently-identified user id. Emits null on logout / before identify. Mirrors Android SDK's StateFlow<String?> and the iOS plugin's shadowed cache (Kit currentUserId is internal).
no setteroverride
entitlementEventChannel EventChannel
final
entitlementUpdates Stream<List<Map<String, dynamic>>>
no setteroverride
eventsEventChannel EventChannel
final
eventsUpdates Stream<Map<String, dynamic>>
Raw stream of SDK analytics/lifecycle events. Each emission is a Map<String, dynamic> with a "type" discriminator (camelCase). The facade converts these to ZeroSettleEvent instances via ZeroSettleEvent.fromMap.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isBootstrappedEventChannel EventChannel
final
isBootstrappedUpdates Stream<bool>
Stream of the "has identify(...) completed successfully?" flag. Mirrors the SDK's isBootstrapped state observable.
no setteroverride
isUcbEnabledEventChannel EventChannel
final
isUcbEnabledUpdates Stream<bool>
Reactive getIsUcbEnabled. Emits false once on iOS (UCB is Android/Play only).
no setteroverride
methodChannel MethodChannel
final
pendingActionsEventChannel EventChannel
final
pendingActionsUpdates Stream<List<Map<String, dynamic>>>
Stream of pending-action list snapshots. Emits whenever the SDK's pendingActions StateFlow mutates. iOS always emits an empty list once.
no setteroverride
pendingCheckoutEventChannel EventChannel
final
pendingCheckoutUpdates Stream<bool>
Stream of the "is a web checkout in-flight?" flag. Mirrors the SDK's pendingCheckout state observable on both platforms.
no setteroverride
pendingClaimsEventChannel EventChannel
final
pendingClaimsUpdates Stream<List<Map<String, dynamic>>>
Stream of pending-claim list snapshots. Emits whenever the SDK's pendingClaims mutates (claim added or removed).
no setteroverride
productsEventChannel EventChannel
final
productsUpdates Stream<List<Map<String, dynamic>>>
Stream of product catalog snapshots. Mirrors the native SDK's products state observable. Emits the current catalog on listen, then every subsequent change.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

acceptSaveOffer({required String productId, required String userId}) Future<Map<String, dynamic>>
override
acceptSaveOfferForCurrentUser({required String productId}) Future<Map<String, dynamic>>
1.3.0 no-userId overload — uses the currently identified user.
override
bootstrap({required String userId}) Future<Map<String, dynamic>>
override
cancelSubscription({required String productId, required String userId, bool immediate = false}) Future<void>
override
cancelSubscriptionForCurrentUser({required String productId, bool immediate = false}) Future<void>
1.3.0 no-userId overload — uses the currently identified user.
override
configure({required String publishableKey, bool syncStoreKitTransactions = true, String? appleMerchantId, bool preloadCheckout = false, int? maxPreloadedWebViews, String? applePaySetupBehavior, String? playLicenseKey, bool syncPlayPurchases = true, bool strictAck = false}) Future<void>
override
dismissPendingAction({required String transactionId}) Future<void>
Dismiss a pending action identified by transactionId. No-op on iOS.
override
fetchCancelFlowConfig({String? userId}) Future<Map<String, dynamic>>
override
fetchProducts({String? userId}) Future<Map<String, dynamic>>
override
fetchTransactionHistory({required String userId}) Future<List<Map<String, dynamic>>>
override
fetchTransactionHistoryForCurrentUser() Future<List<Map<String, dynamic>>>
1.3.0 no-userId overload — uses the currently identified user.
override
fetchUpgradeOfferConfig({String? productId, required String userId}) Future<Map<String, dynamic>>
override
fetchUpgradeOfferConfigForCurrentUser({String? productId}) Future<Map<String, dynamic>>
1.3.0 no-userId overload — uses the currently identified user.
override
fetchUserOffer() Future<Map<String, dynamic>>
Fetches the server-resolved offer for the currently-identified user. Returns the raw UserOfferResponse wire map. The facade converts this to UserOfferResponse.
override
getApplePayState() Future<String>
Reads the current Apple Pay availability state once. Returned as a raw string ("ready" / "setupRequired" / "unavailable"); the facade converts to ApplePayAvailabilityState.
override
getCancelFlowConfig() Future<Map<String, dynamic>?>
override
getCurrentUserId() Future<String?>
The currently identified user ID, or null if identify() hasn't been called.
override
getDetectedJurisdiction() Future<String?>
override
getEntitlements() Future<List<Map<String, dynamic>>>
override
getIsApplePayOnly() Future<bool>
Whether the SDK is currently treating this merchant as Apple-Pay-only. Mirrors ZeroSettle.shared.isApplePayOnly on iOS.
override
getIsBootstrapped() Future<bool>
Whether identify() (or the deprecated bootstrap()) has completed.
override
getIsConfigured() Future<bool>
override
getIsUcbEnabled() Future<bool>
Whether User Choice Billing is currently active for this tenant/market. Always false on iOS (UCB is an Android/Play concept).
override
getPendingActions() Future<List<Map<String, dynamic>>>
Returns the current list of pending actions as raw maps. Android only; iOS always returns an empty list.
override
getPendingCheckout() Future<bool>
override
getPendingClaims() Future<List<Map<String, dynamic>>>
StoreKit purchases the current user could claim from another ZeroSettle account.
override
getProducts() Future<List<Map<String, dynamic>>>
override
getRemoteConfig() Future<Map<String, dynamic>?>
override
getSdkVersion() Future<String>
override
override
hasActiveEntitlement({required String productId}) Future<bool>
override
identify({required String type, String? id, String? name, String? email}) Future<Map<String, dynamic>?>
override
logout() Future<void>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openCustomerPortal({required String userId}) Future<void>
override
pauseSubscription({required String productId, required String userId, required int pauseOptionId}) Future<String?>
override
pauseSubscriptionForCurrentUser({required String productId, int? pauseDurationDays}) Future<String?>
1.3.0 no-userId overload — uses the currently identified user. Takes pauseDurationDays per Kit 1.3.0 (replaces the old pauseOptionId).
override
preloadPaymentSheet({required String productId, String? userId}) Future<void>
override
presentApplePaySetup() Future<void>
Launches the system Wallet setup flow so the user can add a card for Apple Pay. Mirrors ZeroSettle.shared.presentApplePaySetup() on iOS.
override
presentCancelFlow({required String productId, required String userId}) Future<String>
override
presentCancelFlowForCurrentUser({required String productId}) Future<String?>
1.3.0 no-userId overload — uses the currently identified user.
override
presentPaymentSheet({required String productId, String? userId, bool dismissible = true}) Future<Map<String, dynamic>>
iOS only. Android intentionally returns a not_implemented error — Android routes payment through Google Play User Choice Billing, and the web payment sheet is presented internally by the SDK for upgrade/switch offers rather than via this method.
override
presentSaveTheSaleSheet() Future<String>
override
presentUpgradeOffer({String? productId, required String userId}) Future<String>
override
presentUpgradeOfferForCurrentUser({String? productId}) Future<String>
1.3.0 no-userId overload — uses the currently identified user.
override
product({required String productId}) Future<Map<String, dynamic>?>
override
purchase({required String productId, String? presentation}) Future<Map<String, dynamic>>
Unified purchase entry point. Routes to web checkout or StoreKit based on jurisdiction + remote config; can be overridden per-call by presentation.
override
purchaseViaPlayBilling({required String productId}) Future<Map<String, dynamic>>
Android peer of purchaseViaStoreKit. Routes through the Google Play Billing dialog and returns the resulting CheckoutTransaction shape (source == "play_store").
override
purchaseViaStoreKit({required String productId}) Future<Map<String, dynamic>>
Force a StoreKit (App Store IAP) purchase, bypassing web checkout.
override
recommendedAppAccountToken() Future<String>
Derive a deterministic UUID for appAccountToken from the currently identified user ID. Returned as a string.
override
releasePendingCheckout() Future<void>
Cancels an in-flight web checkout. No-op on iOS.
override
resetMigrateTipState() Future<void>
override
resolveMigrationManagerHandle({String? stripeCustomerId}) Future<String>
Returns the iOS-side handle ID for the migration manager scoped to the currently-identified user and the optional stripeCustomerId. The returned ID is opaque; pass it to MigrationManager.fromHandleId.
override
resolveOfferManagerHandle({String? stripeCustomerId}) Future<String>
Returns the iOS-side handle ID for the offer manager scoped to the currently-identified user and the optional stripeCustomerId. The returned ID is opaque; pass it to OfferManager.fromHandleId.
override
restoreEntitlements({required String userId}) Future<List<Map<String, dynamic>>>
override
restoreEntitlementsForCurrentUser() Future<List<Map<String, dynamic>>>
1.3.0 no-userId overload — uses the currently identified user.
override
resumeSubscription({required String productId, required String userId}) Future<void>
override
resumeSubscriptionForCurrentUser({required String productId}) Future<void>
1.3.0 no-userId overload — uses the currently identified user.
override
setBaseUrlOverride(String? url) Future<void>
override
setCustomer({String? name, String? email}) Future<void>
override
showManageSubscription({required String userId}) Future<void>
override
submitCancelFlowResponse(Map<String, dynamic> response) Future<void>
override
toString() String
A string representation of this object.
inherited
trackEvent({required String eventType, required String productId, String? screenName, Map<String, String>? metadata}) Future<void>
override
trackMigrationConversion({required String userId}) Future<void>
override
trackMigrationConversionForCurrentUser() Future<void>
1.3.0 no-userId overload — uses the currently identified user.
override
transferPlayOwnershipToCurrentUser({required String productId, required String originalTransactionId}) Future<void>
Android peer of transferStoreKitOwnershipToCurrentUser. Takes both productId and originalTransactionId (the Play purchase token) — the SDK needs both to resolve the source purchase via the Play API.
override
transferStoreKitOwnershipToCurrentUser({required String productId}) Future<void>
override
warmUpPaymentSheet({required String productId, String? userId}) Future<void>
override

Operators

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