InAppPurchasesConfig class
Constructors
-
InAppPurchasesConfig.new({Uri getProductsListingApiEndpoint()?, List<
PurchaseProductListing> getProductsListingResponseParser(String response)?, Uri purchaseVerificationApiEndpoint(Transaction transaction, Map<String, dynamic> ? params)?, BaseRequest purchaseVerificationRequestMapper(Request request, Transaction transaction)?, bool completeWithoutVerifying = false, ProductItemTypeMapper? productTypeMapper, Logger? logger}) -
const
- InAppPurchasesConfig.mock()
-
factory
Properties
- completeWithoutVerifying → bool
-
If you want your purchases to complete without verifying them on your own server, set this flag to true, otherwise it will throw an error
Completing without validating is not recommended
Defaults to false
final
- getProductsListingApiEndpoint → Uri Function()?
-
final
-
getProductsListingResponseParser
→ List<
PurchaseProductListing> Function(String response)? -
Provides a way to transform Product items listing response by providing a mapper function
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger → Logger?
-
A logger to be used for the PurchaseServiceImpl
final
- productTypeMapper → ProductItemTypeMapper?
-
This function is used to determine the ProductType of each product when retrieved from stores
if you have defined getProductsListingResponseParser this function will provide you with a result of that api data
so you could use it to map the type
By default if you don't set this property but do set getProductsListingResponseParser this will internally it´s results
to the type from there
final
-
purchaseVerificationApiEndpoint
→ Uri Function(Transaction transaction, Map<
String, dynamic> ? params)? -
Provides an Api Endpoint in order to verify completed transactions
It provides you with the transaction and custom parameter that can be configured in the Bloc or BlocProvider
final
- purchaseVerificationRequestMapper → BaseRequest Function(Request request, Transaction transaction)?
-
Provides a custom function that allows you to customize the way your request's body is sent to the API
It provides you access to the original
Request
and Transaction being verified Example function(productItem) { return Request('PATCH', Uri.parse())..body={} }final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited