Skip to main content
Question

Flutter - Paywall - Restore does nothing

  • June 17, 2026
  • 4 replies
  • 24 views

Forum|alt.badge.img+4

I believe I have followed the documentation correctly, but I must have missed something since restore is not working.  Purchase works fine in my testing, thus far all on simulator, iOS and Android.

On my first page I do the following:

 

 @override
void initState() {
super.initState();
SettingsRepository().addLaunchCount();
WidgetsBinding.instance.addObserver(this);
handlePaywall();
}

void handlePaywall() async {
presentPaywallIfNeeded().then((result) {
print('Paywall result: $result');
if (mounted) {
if (result == PaywallResult.notPresented && kDebugMode) {
Purchases.getCustomerInfo().then((customerInfo) {
if (mounted) {
setState(() {
_debugCustomerInfo = customerInfo;
_paywallResult = result;
});
}
});
} else {
setState(() {
_paywallResult = result;
});
}
}
});
}

 

Then in the page I handle the result. When a user clicks restore all that happens is the button flashes. If I then “close” the paywall with the “x” I get my “successfully restored” response.  The “purchase” options work as expected as they go through the store purchase flow then end up dismissing the dialog and my “success” message is shown.  What am I missing in this flow? Did I setup something wrong in the paywall or am I missing some check someplace?

 

4 replies

alejandra-wetsch
RevenueCat Staff
Forum|alt.badge.img+6

Hey ​@john-wiese

Thank you for the code snippet shared!

To add more context, the Paywall has an automatic mechanism that dismisses itself when a purchase is made or when a specific entitlement is granted after a purchase is restored.

In this case, since the SDK doesn’t know which entitlement you’re expecting to grant, the restore purchase will be restored (as displayed after Paywall dismissal), but the Paywall won't be dismissed automatically. 

To troubleshoot this, you could update your current code and pass an entitlement to presentPaywallIfNeeded:

.presentPaywallIfNeeded('your_entitlement')

Or use PaywallView, as shown here, which gives you more flexibility in how to display and respond to Paywall events.

Hope this helps!


Forum|alt.badge.img+4
  • Author
  • Member
  • June 17, 2026

I actually am doing this already:
 

Future<PaywallResult> presentPaywallIfNeeded() async {
return await RevenueCatUI.presentPaywallIfNeeded('subscription_purchased');
}

 


Forum|alt.badge.img+4
  • Author
  • Member
  • June 17, 2026

I’ll review the “PaywallView” though, perhaps I will need to change to that.


Forum|alt.badge.img+4
  • Author
  • Member
  • June 18, 2026

I was able to get it working by displaying the paywall manually using the PaywallView and handling the different states, thanks!