animateCoderPath method

dynamic animateCoderPath(
  1. Path path,
  2. Paint paint,
  3. Canvas canvas,
  4. double progress,
)

Implementation

animateCoderPath(Path path, Paint paint, Canvas canvas, double progress) {
  PathMetrics shadowMetrics = path.computeMetrics();
  for (PathMetric pathMetric in shadowMetrics) {
    Path extractPath = pathMetric.extractPath(
      0.0,
      pathMetric.length * progress,
    );
    canvas.drawPath(extractPath, paint);
  }
}