PostHog / posthog-flutter

PostHog Flutter SDK
https://posthog.com/docs/libraries/flutter
MIT License
55 stars 37 forks source link

Change Posthog client lib to be a singleton for shared state and bump… #5

Closed fuziontech closed 4 years ago

fuziontech commented 4 years ago

… version v1.10.0

This will require users to user Posthog().capture() instead of Posthog.capture()

The reason why the change is if a user wants to set the current .screen and then have that be included in future .capture events, especially where they may be calling .capture without knowing what screen the user is on. In order to do this we need to keep some state in the Posthog client and we only want one, so singleton it is!