RevenueCatSubscriptionService class

Implemented types

Constructors

RevenueCatSubscriptionService.new({required Logger logger, required String rcApiKey})

Properties

fetchedPaywalls → Map<String, Paywall>
All paywalls list, fetched on start
final
hashCode → int
The hash code for this object.
no setterinherited
logger → Logger
final
paywallsStream → BehaviorSubject<Map<String, Paywall>?>
Stream with paywalls
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subscriptionStatus → BehaviorSubject<bool>
Stream with subscription status
final
userId ↔ String?
Payment provider user id
getter/setter pairoverride-getter

Methods

addAttributionProviders(Map<AttributionProvider, String> providers) → Future<void>
Add attributes to the sub service to match between analytics
override
initialize() → Future<void>
Initialize subscription service, prepare sdk, fetch paywalls
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paywallProducts({required String paywallId}) → List<ProductModel>
All products from specific paywall. If not found throws PaywallFindFailedException
override
purchase({required String productId, dynamic product}) → Future<bool>
Purchase product by id
override
restorePurchases() → Future<bool>
Restore all purchases
override
setAdvertisingIdentifier({required String? idfa, required String? idfv}) → Future<void>
Set advertising identifiers for better attribution and sync between services
override
syncPurchases() → Future<void>
Sync purchases if migrating from another payment sdk
throwErrorOnPlatformException(PlatformException exception) → Never
toString() → String
A string representation of this object.
inherited
updateAuthListener(BehaviorSubject<AuthUser?>? authStateChanges) → Future<void>
Add auth listener to update user id on login/logout
override

Operators

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