File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ abstract class RevenueCatClient {
8686
8787 /// Returns the user management URL.
8888 Future <String ?> getManagementUrl ();
89+
90+ /// Invalidates the user info.
91+ Future <void > invalidateUserInfo () => Future .value ();
8992}
9093
9194/// Represents a purchasable item.
Original file line number Diff line number Diff line change @@ -85,4 +85,7 @@ class RevenueCatMethodChannelClient extends RevenueCatClient {
8585 CustomerInfo customerInfo = await Purchases .getCustomerInfo ();
8686 return customerInfo.managementURL;
8787 }
88+
89+ @override
90+ Future <void > invalidateUserInfo () => Purchases .invalidateCustomerInfoCache ();
8891}
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ class ContributorPlan extends AsyncNotifier<ContributorPlanState> {
8383 return const ResultCancelled ();
8484 case PaywallResult .purchased:
8585 case PaywallResult .restored:
86+ await revenueCatClient.invalidateUserInfo ();
8687 if (await revenueCatClient.hasEntitlement (AppContributorPlan .entitlementId)) {
8788 state = const AsyncData (ContributorPlanState .active);
8889 }
You can’t perform that action at this time.
0 commit comments