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:
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.
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.