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

How can we restart the CountdownTimer #24

Open
panchalAlpit opened this issue Feb 12, 2021 · 5 comments
Open

How can we restart the CountdownTimer #24

panchalAlpit opened this issue Feb 12, 2021 · 5 comments

Comments

@panchalAlpit
Copy link

how can we restart the timer in between time counting? I mean is it possible to restart the timer.

@wuweijian1997
Copy link
Owner

Update endTime.

    setState(() {
            endTime = DateTime.now().millisecondsSinceEpoch + 1000 * 30;
          });

@panchalAlpit
Copy link
Author

Thanks now it's working.

@panchalAlpit panchalAlpit reopened this Feb 15, 2021
@panchalAlpit
Copy link
Author

it's not working in Bottomsheet. I have checked the Get.bottomSheet(). and showModalBottomSheet().

@wuweijian1997
Copy link
Owner

May I have a look at your code?Minimum runnable code that does not work.

@netgfx
Copy link

netgfx commented Mar 24, 2021

@wuweijian1997 it cannot be restarted if it has ended, because it gets disposed, could we maybe add a property whether or not to dispose when it ends? that will allow us to restart the timer once it has ended (and yes dispose in that case should be manual).

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

3 participants