Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature block is being executed regardless the user subscribed or not #27

Open
apexborg opened this issue Sep 6, 2024 · 1 comment
Open

Comments

@apexborg
Copy link

apexborg commented Sep 6, 2024

Nothing wrong with the function when it's being called from an ElevatedButton's onPressed(), it works as it supposed to.

But when I call it from initState() or build() methods, the body gets executed while (or even before) presenting the paywall itself.

Superwall.shared.registerEvent('flutter', handler: handler, feature: () {
        print('Executing feature block');    // this line here
});

I tested it with the example project as well and the same thing is happening there.

superwallkit_flutter: ^1.2.2
purchases_flutter: ^8.1.0

@sethmills21
Copy link

yo @apexborg check your paywall if you have it set to gated or non gated, if it's non-gated it will just go straight through

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants