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

Use a timer to handle scrolling #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Jei
Copy link

@Jei Jei commented Jun 1, 2020

Using an infinite loop to handle recurring calls to the "scroll" method causes a memory leak since it keeps running even after the component is rebuilt or replaced.
I've replaced it with a RestartableTimer from the async plugin and refactored the widget as a StatefulWidget to cancel the timer and the ScrollController when dispose is called.

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.

None yet

1 participant