Skip to main content
Question

[Flutter] Re-initialize Paywall

  • 9 October 2024
  • 1 reply
  • 25 views

Forum|alt.badge.img+2

I have the following use case: A user can choose between using the app without an account or with an account, after which the data is synced to the cloud. In both cases, the user can purchase the Pro version. I display different paywalls depending on whether the user is logged in or not. This is managed through custom attributes and paywall targeting:

  1. Without an account → Show paywall without the sync option.
  2. With an account → Show paywall with the sync option.

Problem: When a user starts without an account but then creates one, the app still displays the paywall meant for users without accounts even though the custom attribute is updated. The updated paywall is only shown after a restart. Is there a way to reinitialize the paywall or clear the cache without restarting the app?

I don’t want to hard code the offering for the paywall in the code because I want to stay flexible and run experiments.

This post has been closed for comments

1 reply

Forum|alt.badge.img+8
  • RevenueCat Staff
  • 418 replies
  • October 11, 2024

Hi, you can reinitialize the paywall by passing the offering to presentPaywallIfNeeded


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings