createPath method

  1. @override
Path createPath(
  1. Offset offset,
  2. double size,
  3. dynamic neighbors
)

Implementation

@override
Path createPath(Offset offset, double size, Neighbors? neighbors) {
  final realSize = size * radiusFraction;
  final offset2 = (size - realSize) / 2;
  final width = size / 7 * widthFraction.coerceAtLeast(0);

  return Path()
    ..fillType = PathFillType.evenOdd
    ..addOval(Rect.fromLTWH(offset.dx + offset2, offset.dy + offset2, realSize, realSize))
    ..addOval(Rect.fromLTWH(offset.dx + offset2 + width, offset.dy + offset2 + width,
        size - offset2 * 2 - width * 2, size - offset2 * 2 - width * 2));
}