Skip to content

Enable removal of PaywallEventsObserver callback#191

Open
rikardonm wants to merge 1 commit into
adaptyteam:masterfrom
rikardonm:master
Open

Enable removal of PaywallEventsObserver callback#191
rikardonm wants to merge 1 commit into
adaptyteam:masterfrom
rikardonm:master

Conversation

@rikardonm

Copy link
Copy Markdown

In the integration example (https://adapty.io/docs/flutter-quickstart-paywalls#full-example) a StatefulWidget is registered as a paywall event observer with AdaptyUI().setPaywallsEventsObserver(this);, creating a reference to object.

However, no method to clear such registration is given, forcing the library to keep the Widget alive (via ref count).
This PR modifies the setPaywallsEventObserver by enabling the callback to be null, thus enabling cleanup actions.

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

Successfully merging this pull request may close these issues.

1 participant