I'm trying to restart the timer and hit API in the onComplete function.
The above scenario works fine when I stop at the same screen where I implemented the countdown timer, but a similar scenario fails when I go to another screen.
Please let me know ASAP as I have an urgency.
Thanks in advance!!!
Steps to Reproduce:
Go to screen X where the countdown timer is implemented.
Start the countdown timer.
Navigate to screen Y and wait until the countdown is over.
Go to screen X and you'll see the timer hit again when you reach to screen X.
Expected Behavior:
onComplete methods need to work as well when the user is on another screen.
Actual Behavior:
onComplete function is not invoking when the user is on another screen.
onComplete: () async{ _homeBloc.setIsLoading(true); await _homeBloc.getPendingOrders(); _controller.restart(); },
I'm trying to restart the timer and hit API in the onComplete function.
The above scenario works fine when I stop at the same screen where I implemented the countdown timer, but a similar scenario fails when I go to another screen.
Please let me know ASAP as I have an urgency.
Thanks in advance!!!
Steps to Reproduce:
Go to screen X where the countdown timer is implemented.
Start the countdown timer.
Navigate to screen Y and wait until the countdown is over.
Go to screen X and you'll see the timer hit again when you reach to screen X.
Expected Behavior:
onComplete methods need to work as well when the user is on another screen.
Actual Behavior:
onComplete function is not invoking when the user is on another screen.
onComplete: () async{ _homeBloc.setIsLoading(true); await _homeBloc.getPendingOrders(); _controller.restart(); },