How to Create a Bordered Circle using Canvas in Flutter?

This Article is posted by seven.srikanth at 1/12/2019 6:07:47 PM



<p id="d19a66;](false;" class=".color .strokeWidth .style" _paint="" color:="" color:="" color:="" color:="" color:="" color:="" color:="" color:="">![](https://fluttercentral.com/Uploads/3d1af97a-75b8-4e98-9fd8-45499c4cdc44.jpgwidth="50%height="auto]( You can add below call to your code and create a Circle in your program.color: rgb(187, 187, 187); background-color: rgb(40, 44, 52); font-family: Consolas, "Courier New", monospace; font-size: 18px; line-height: 24px; white-space: pre-wrap;](color: #c678dd;](class color: #e5c07b;](DrawCircle color: #c678dd;](extends color: #e5c07b;](CustomPainter { color: #e5c07b;](Paint _paint; color: #e5c07b;](DrawCircle() color: #c678dd;](@override color: #c678dd;](void color: #61afef;](paint(color: #e5c07b;](Canvas canvas, color: #e5c07b;](Size size) { canvas.color: #61afef;](drawCircle(color: #e5c07b;](Offset(color: #d19a66;](0.0, color: #d19a66;](0.0), color: #d19a66;](100.0, _paint); } color: #c678dd;](@override color: #c678dd;](bool color: #61afef;](shouldRepaint(color: #e5c07b;](CustomPainter oldDelegate) } color: rgb(33, 37, 41); white-space: pre-wrap; background-color: rgb(248, 249, 250);](In order to create a Circle in your program, you can follow below example. color: rgb(187, 187, 187); background-color: rgb(40, 44, 52); font-family: Consolas, "Courier New", monospace; font-size: 18px; line-height: 24px; white-space: pre-wrap;](bodycolor: #c678dd;](: color: #e5c07b;](Center( color: #7f848e;font-style: italic;](// Center is a layout widget. It takes a single child and positions it color: #7f848e;font-style: italic;](// in the middle of the parent. childcolor: #c678dd;](: color: #e5c07b;](Container( childcolor: #c678dd;](: color: #e5c07b;](CustomPaint(paintercolor: #c678dd;](: color: #e5c07b;](DrawCircle()), ), ), Hope this example will be useful to you. Thanks,Srikanth</p>


Tags: How to Create a Bordered Circle using Canvas in Flutter?








0 Comments
Login to comment.
Recent Comments