Timer issue

Widgets & Design

I have a page that utilizes the timer widget in countdown mode. It reads a timestamp from a Firebase document and starts the countdown from the current time global parameter to that timestamp. This is all good in theory, in practice, the timer widget displays the correct remaining time, but the actual countdown happens like only one out of ten times.

I have an on page load action that compares the times and if found with a positive value, calls the action start timer, cause otherwise it starts giving negative values which is funny and embarrassing at the same time ๐Ÿ˜„

P.S: The countdown always works in test mode, but on the actual devices (Android and iOS) this behavior happens. If I keep reloading (navigating back and forth) the page, again 1 time out of 10 times the countdown starts, else it's just the duration when the page loaded and stuck like a text widget.

Appreciate any help/ideas on the matter.

What have you tried so far?

Many things, like even setting the timestamp to a PageState and rebuilding the page on page load to ensure the countdown starts but it's a hit and miss ๐Ÿ˜•

Did you check FlutterFlow's Documentation for this topic?
Yes
2
1 reply