BillingClient constructor
BillingClient(
- PurchasesUpdatedListener onPurchasesUpdated,
- UserSelectedAlternativeBillingListener? alternativeBillingListener, {
- @visibleForTesting InAppPurchaseApi? api,
Creates a billing client.
Implementation
BillingClient(
PurchasesUpdatedListener onPurchasesUpdated,
UserSelectedAlternativeBillingListener? alternativeBillingListener, {
@visibleForTesting InAppPurchaseApi? api,
}) : _hostApi = api ?? InAppPurchaseApi(),
hostCallbackHandler = HostBillingClientCallbackHandler(
onPurchasesUpdated, alternativeBillingListener) {
InAppPurchaseCallbackApi.setUp(hostCallbackHandler);
}