clearCurrentSetup method
void
clearCurrentSetup()
Clear the current Google Pay setup and clean up resources Call this when switching between payment modes to prevent callback leaks
Implementation
void clearCurrentSetup() {
_googlePayEventSubscription?.cancel();
_googlePayEventSubscription = null;
_onInvoiceCreated = null;
_onExecutePaymentSuccess = null;
_onSessionUpdated = null;
_onReceivedToken = null;
_onError = null;
}