EbPurchaseService class
Helper class for managing in-app purchases in Flutter applications.
- Implemented types
Constructors
- EbPurchaseService()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isStoreAvailable
→ Future<
bool> -
Returns
true
if the payment platform is ready and available.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buyProduct(
{required PurchaseParam purchaseParam, dynamic onError(String)?}) → Future< void> -
Initiates a purchase for a given product.
override
-
checkPlatformSubscription(
{required ProductDetails productDetails, String? oldProductId, ReplacementMode? replacementMode}) → PurchaseParam - Checks the purchase parameter for Android and IOS platform. For Android It checks the old subscription to determine if the user is upgrading or downgrading the subscription.
-
completePurchase(
{required PurchaseDetails purchaseDetail, OnError? onError}) → Future< void> -
override
-
configure(
{required Set< String> productIds, required OnPurchaseDetailsReceived onDetailsFetched, dynamic onError(dynamic error)?}) → void -
Configures the in-app purchase system.
IMPORTANT! You must subscribe to this stream as soon as your app launches,
override
-
createSubscriptionPlan(
{required PurchaseDetails purchasedProduct, String? currencySymbol, String? price}) → Future< BasePurchaseModel> -
override
-
dispose(
) → void -
Cancels the subscription to purchase stream.
override
-
fetchInAppProducts(
) → Future< Either< String, List< >PurchasePlanModel> > -
Fetches product details for given product IDs.
override
-
getOldPurchaseDetails(
ProductDetails productDetails) → GooglePlayPurchaseDetails? -
This Checks the user's old subscription in Android platform
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restorePurchases(
{OnError? onError}) → Future< void> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
verifyPurchase(
{required PurchaseDetails purchaseDetail}) → PurchaseStatus -
Verifies the status of purchases.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited