Created
April 9, 2020 09:58
-
-
Save divyanshub024/17521a8c9c83200fcafaf5d94eeaf369 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
void paint(Canvas canvas, Size size) { | |
var path = createPath(); | |
PathMetrics pathMetrics = path.computeMetrics(); | |
for (PathMetric pathMetric in pathMetrics) { | |
Path extractPath = pathMetric.extractPath( | |
0.0, | |
pathMetric.length * progress, | |
); | |
canvas.drawPath(extractPath, myPaint); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment