Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class MyPainter extends CustomPainter {
...
@override
void paint(Canvas canvas, Size size) {
final line = Paint()
..color = lineColor
..strokeCap = StrokeCap.round
..style = PaintingStyle.stroke
..strokeWidth = width;
final center = Offset(size.width/2, size.height/2);
final radius = min(size.width/2, size.height/2);
canvas.drawCircle(
center,
radius,
line
);
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment