import 'package:flutter/material.dart'; class CirclePainter extends CustomPainter { final double value; CirclePainter(this.value); @override void paint(Canvas canvas, Size size) { var paint = Paint() ..color = Colors.greenAccent.withOpacity(0.5) ..style = PaintingStyle.fill; double radius = value * 500 / 100; print(radius); canvas.drawCircle(Offset(size.width / 6, size.height / 4), radius, paint); //print(size.width / 6); } @override bool shouldRepaint(covariant CustomPainter oldDelegate) => true; }