Last active
May 11, 2020 06:55
-
-
Save alohaabhi/ffe14a53794c4e4b2c9b73ee9d5124f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DrawCircle extends CustomPainter { | |
Paint circlePaint; | |
final radius; | |
DrawCircle(Color color, this.radius) { | |
this.circlePaint = Paint() | |
..color = color | |
..style = PaintingStyle.fill; | |
} | |
@override | |
void paint(Canvas canvas, Size size) { | |
canvas.drawCircle(Offset(0.0, 0.0), radius, circlePaint); | |
} | |
@override | |
bool shouldRepaint(CustomPainter oldDelegate) { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment