react-native-circular-progress
react-native-circular-progress copied to clipboard
Timer as "fill" value
Hello all, My issue is that, the progress seems finish before the actual time. There is a way to access the remaining time?
How I have configured the increase time:
setInterval(() => { if (!this.state.stopTimer) { this.setState({ currentTime: subSeconds(this.state.currentTime, 1), }); } }, 1000);
How I have configured the progress:
<AnimatedCircularProgress size={250} width={12} fill={100} duration={0} style={styles.progress} tintColor="#b09838" onAnimationComplete={() => this.animationComplete()} backgroundColor="#3d5875" ref={ref => (this._circularProgressRef = ref)}> {fill => ( <Text style={styles.remainingTime}> {format(this.state.currentTime, 'mm:ss')} </Text> )} </AnimatedCircularProgress>
Thanks in advance for your time 😄
I'm also having the same issue, if I run interval for 1 minutes, the progress fills completely around 5 seconds before timeout.
circularProgress.current.animate(100, (60 * 1000), Easing.linear);
Any solution?
Thanks