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

Infinte looping while debug #16

Closed
engrpiyush opened this issue Apr 16, 2021 · 0 comments
Closed

Infinte looping while debug #16

engrpiyush opened this issue Apr 16, 2021 · 0 comments

Comments

@engrpiyush
Copy link

engrpiyush commented Apr 16, 2021

    if (_currentMicroSeconds != 0) {
      _timer = Timer.periodic(
        widget.interval,
        (Timer timer) {
          if (_currentMicroSeconds == 0) {
            timer.cancel();

The == on the second last line (Line 127) needs to be changed to <= , otherwise I see the _currentMicroSeconds going negative making the countdown endless.

Screen.Recording.2021-04-17.at.1.58.14.AM.mov
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

No branches or pull requests

1 participant