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

Don't leave timer running during tear-down of widget tree #35

Merged
merged 1 commit into from
Sep 30, 2019

Conversation

kentcb
Copy link
Contributor

@kentcb kentcb commented Sep 24, 2019

Fixes #34 by using scheduleMicroTask rather than Timer.run. This ensures that there are no outstanding timers when the widget tree is torn down.

@Ahmadre
Copy link

Ahmadre commented Sep 30, 2019

@leisim

@simc
Copy link
Owner

simc commented Sep 30, 2019

Thanks for this pull request 👍

@simc simc merged commit a2cb00e into simc:master Sep 30, 2019
@nohli
Copy link
Contributor

nohli commented Oct 30, 2019

I'm having the problem

A Timer is still pending even after the widget tree was disposed.

as in #34

Can you please update the package version, so I can use the above fix?
(How come other users don't get the same error during testing?)

giano574 added a commit to aau-giraf/weekplanner that referenced this pull request Mar 4, 2020
Waiting on simc/auto_size_text#35 to be implemented in auto_size_text
@garry-jeromson
Copy link

I'm having the problem

A Timer is still pending even after the widget tree was disposed.

as in #34

Can you please update the package version, so I can use the above fix?
(How come other users don't get the same error during testing?)

The error still happens (in my case with Flutter 1.20.3). @leisim Are you still actively maintaining this package, or would you recommend forking and continuing under another name?

@nohli
Copy link
Contributor

nohli commented Sep 16, 2020

@garry-jeromson you can put this in pubspec.yaml:

  auto_size_text:
    git:
      url: https://github.com/leisim/auto_size_text
      ref: a2cb00

@caiogranero
Copy link

I really enjoy this package but i got this error too, @nohli comment fix the problem but i'm worry with the maintence of the package.

@PieterAelse
Copy link

Wow, this still hasn't been part of a new release yet? @leisim could you please create one?

@caiogranero
Copy link

@garry-jeromson you can put this in pubspec.yaml:

  auto_size_text:
    git:
      url: https://github.com/leisim/auto_size_text
      ref: a2cb00

Sorry to reborn this PR but this solution isn't working for me anymore, i'm getting:

Running "flutter pub get" in project-name...             
Package doesn't exist (the pubspec for auto_size_text 2.1.0 from git has version 3.0.0-nullsafety.0).

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.

Use of AutoSizeText.group leads to assertion failure when running widget tests
7 participants