SubscriptionDataSource class abstract interface

Contract that a platform billing integration must implement to supply SubscriptionManager with real subscription data.

Implement this for RevenueCat, in-house backend, App Store Server API, etc.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetchAllSubscriptions() Future<List<SubscriptionInfo>>
Returns all subscriptions ever purchased by the user, regardless of status.
fetchSubscription(String productId) Future<SubscriptionInfo?>
Returns the current SubscriptionInfo for the given productId, or null if the user has never purchased it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refresh() Future<void>
Forces the data source to re-validate purchases with the billing backend.
restore() Future<List<SubscriptionInfo>>
Triggers the platform restore-purchases flow and returns the restored infos.
toString() String
A string representation of this object.
inherited

Operators

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