circle function

Component circle(
  1. List<Component> children, {
  2. String? cx,
  3. String? cy,
  4. String? r,
  5. Color? fill,
  6. Color? stroke,
  7. String? strokeWidth,
  8. Key? key,
  9. String? id,
  10. String? classes,
  11. Styles? styles,
  12. Map<String, String>? attributes,
  13. Map<String, EventCallback>? events,
})

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 Component.element(
    tag: 'circle',
    key: key,
    id: id,
    classes: classes,
    styles: styles,
    attributes: {
      ...?attributes,
      'cx': ?cx,
      'cy': ?cy,
      'r': ?r,
      'fill': ?fill?.value,
      'stroke': ?stroke?.value,
      'stroke-width': ?strokeWidth,
    },
    events: events,
    children: children,
  );
}