StorePurchaseService class
StoreKit / Play Billing purchases. Subscribes to the store before any purchase, journals each transaction (queue) before verify checks it on the server, completes it with the store only once verified, and replays unverified transactions when started (ready).
- Implemented types
Constructors
- StorePurchaseService({required PurchaseVerifier verify, required PurchaseRetryQueue queue, StoreGateway? store, StoreProductMetadata? metadata, TargetPlatform? platform})
- StorePurchaseService.withStorage(LocalStorage storage, {required PurchaseVerifier verify, StoreGateway? store})
-
A service journaling in
storage.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- metadata → StoreProductMetadata
-
final
- platform → TargetPlatform
-
Picks the slot's App Store or Play product id.
final
- queue → PurchaseRetryQueue
-
final
-
ready
↔ Future<
void> -
Completes once journaled transactions were replayed.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- store → StoreGateway
-
final
-
updates
→ Stream<
PaywallResult> -
Purchase outcomes, as the store delivers them.
no setteroverride
- verify → PurchaseVerifier
-
final
Methods
-
dispose(
) → Future< void> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
products(
List< ProductSlot> slots) → Future<List< PaywallProduct> > -
The store's products for
slots.override -
purchase(
PaywallProduct product) → Future< void> -
Starts buying
product; the outcome arrives on updates.override -
purchaseWithOffer(
PaywallProduct product, PurchaseOfferPreference offer) → Future< void> -
override
-
replayPending(
) → Future< void> - Verifies the journaled transactions again.
-
restore(
) → Future< void> -
Restores verified purchases; outcomes arrive on updates.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited