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

Changing the "SystemChannels.lifecycle" to "AppLifecycleListener" #16

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

GabrielRozendo
Copy link
Contributor

Changing the SystemChannels.lifecycle to AppLifecycleListener

The SystemChannels.lifecycle causes side impacts on whole app and should not be used.
Replacing for AppLifecycleListener

Related to item 1 in #13, quoting:

  1. Lifecycle issue

The PR #8 is working as should

but now I need to listen the flutter's lifecycle in my app (not in aptabase's package) and since the package already is doing that and as documented on SystemChannels.lifecycle:

/// The given callback will replace the currently registered callback for this
/// channel, if any. To remove the handler, pass null as the handler
/// argument.
we would lose the feature "send events when app goes to background".
And I've found out the SystemChannels.lifecycle has other unwanted side effects in general.

Copy link

@lora-explora lora-explora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked out the PR and can verify that Aptabase tracking still works and the lifecycle listeners get called again in the app 👍

@cristipufu cristipufu merged commit c2ef51e into aptabase:main Dec 18, 2024
@GabrielRozendo GabrielRozendo deleted the fix-lifecycle branch December 19, 2024 12:15
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.

3 participants