Tracking progress is not always that simple, especially when you have to calculate the progress on a scale which initial and target value can be negative and positive. In this video I give you the magic formula which you can use for your app to handle any percentage calculation.
Formula: Percentage Progress = ((currentValue - initial) * 100) / (target - initial)
-----------------------------------------------------------------------
Contents:
00:00 - Intro
00:52 - Dumb percentage calculation
03:48 - Smart percentage calculation
05:43 - Code implementations
07:28 - Outro
-----------------------------------------------------------------------
Resources:
♨ Source Code on Github: https://github.com/syntacops/flutter_...
Follow me:
▶ Facebook: / syntac.ops.7
▶ Twitter: / syntacops
▶ Reddit: / syntacops