storePurchaseUpdates function

  1. @riverpod
Stream<VerifiedPurchaseUpdate> storePurchaseUpdates(
  1. Ref ref
)

Drives purchase delivery for the signed-in account while the app is open.

Implementation

@riverpod
Stream<VerifiedPurchaseUpdate> storePurchaseUpdates(Ref ref) {
  if (!ref.watch(storeAvailableProvider)) return const Stream.empty();
  return ref.watch(commerceServiceProvider).verifiedUpdates();
}