Dynamic progress bar update according time

 How to do a real-time update in a flutter, with a liquid progress indicator(auto increase with time):-

First, you add these packages to the project. liquid progress bar package for the liquid progress indicator and shared preference for saving time in variable.
1. add packages in  pubspec like this:


2. initialize liquid progress indicator and start progress button like this.



3. make a real-time function with a timer like displayed in the below image.
note: don't forget to cancel the timer on dispose.


in the last add percentage value in a liquid indicator like displayed in the below image.

add double parse with 0. with percentage because it takes double value.

finally, you make real-time data with a timer and you use it this process any were.

For more information on packages, widgets and solutions take a dive into the flutterStuff.


Post a Comment

Previous Post Next Post

Contact Form