circle function
The <circle> SVG element is an SVG basic shape, used to draw circles based on a center point and a radius.
cx
: The x-axis coordinate of the center of the circle.cy
: The y-axis coordinate of the center of the circle.r
: The radius of the circle.fill
: The color (or gradient or pattern) used to paint the shape.stroke
: The color (or gradient or pattern) used to paint the outline of the shape.strokeWidth
: The width of the stroke to be applied to the shape.
Implementation
Component circle(List<Component> children,
{String? cx,
String? cy,
String? r,
Color? fill,
Color? stroke,
String? strokeWidth,
Key? key,
String? id,
String? classes,
Styles? styles,
Map<String, String>? attributes,
Map<String, EventCallback>? events}) {
return DomComponent(
tag: 'circle',
key: key,
id: id,
classes: classes,
styles: styles,
attributes: {
...attributes ?? {},
if (cx != null) 'cx': cx,
if (cy != null) 'cy': cy,
if (r != null) 'r': r,
if (fill != null) 'fill': fill.value,
if (stroke != null) 'stroke': stroke.value,
if (strokeWidth != null) 'stroke-width': strokeWidth,
},
events: events,
children: children,
);
}