Ok, I am using a circularProgressIndicator to show when a timer reaches complete, however my brain has ceased to function and I can't get the math to work for it.
- The timer value is 90 seconds
- The progress indicator is 100% at 1, or 50% at 0.5 etc..
- Every second I reduce the 90 seconds timer by 1 second so show the countdown
I would also like to incrementally add to the progress indicator value to reach 100% when the timer of 90 seconds has run out.
90 is an example, this will change regularly
What I have tried
1. _intervalProgress += (( 100 / intervalValueSeconds) / 60;
2. _intervalProgress += (( 100 / intervalValueSeconds) * ( 100 / 60 )) / 100;
Question: How can I find a decimal of a value, then divide by 60 in order to iterate ever second <--- Wait, I just realised that the value isn't 60 seconds, it is the value of the timer, therefore I have been calculating it wrong all along.