drawPath static method

CustomPaint drawPath(
  1. Path path, {
  2. Paint? pathPaint,
})

Return a CustomPaint widget with the current CustomPainter

Implementation

static CustomPaint drawPath(Path path, {Paint? pathPaint}) {
  if (pathPaint != null) {
    return CustomPaint(
      painter: DottedCropPathPainter(path, pathPaint: pathPaint),
    );
  } else {
    return CustomPaint(
      painter: DottedCropPathPainter(
        path,
        pathPaint: Paint()
          ..color = Colors.white
          ..strokeWidth = 4.0
          ..style = PaintingStyle.stroke
          ..strokeJoin = StrokeJoin.round,
      ),
    );
  }
}