dispose method
void
dispose()
Ends connection to the BillingClient.
Consider calling dispose after you no longer need the BillingClient API to free up the resources.
After calling dispose:
- Further connection attempts will not be made.
- purchasesUpdatedStream will be closed.
- userChoiceDetailsStream will be closed.
- Calls to runWithClient and runWithClientNonRetryable will throw.
Implementation
void dispose() {
_debugAssertNotDisposed();
_isDisposed = true;
client.endConnection();
_purchasesUpdatedController.close();
_userChoiceAlternativeBillingController.close();
}