I've implemented a listener for subscription status changes in my Flutter app like this:
void listenToCustomerInfoUpdates(Function(CustomerInfo) listener) {
Purchases.addCustomerInfoUpdateListener((customerInfo) {
listener(customerInfo);
});
}
I want to confirm: If a user cancels their subscription through the system subscription settings (App Store), will this listener automatically detect the change?- I've set up the listener in my service layer
- Using it with BLoC pattern to update UI state
- The listener is registered when the app initializes
Is this the correct approach for handling real-time subscription status updates? Will it catch all subscription state changes including cancellations through the system settings?Thanks in advance for any clarification!