ModernMemoires/lib/utils/CirclePainter.dart

24 lines
557 B
Dart
Raw Normal View History

2023-12-17 23:00:31 +01:00
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;
2023-12-25 14:10:31 +01:00
double radius = value * 500 / 100;
print(radius);
2023-12-17 23:00:31 +01:00
canvas.drawCircle(Offset(size.width / 6, size.height / 4), radius, paint);
2023-12-25 14:10:31 +01:00
//print(size.width / 6);
2023-12-17 23:00:31 +01:00
}
@override
bool shouldRepaint(covariant CustomPainter oldDelegate) => true;
}