SvgLine constructor

SvgLine({
  1. required num x1,
  2. required num y1,
  3. required num x2,
  4. required num y2,
  5. String? stroke,
  6. String? className,
  7. Map<String, String>? attrs,
  8. Map<String, BloomEventHandler>? on,
})

Creates an SVG <line> segment descriptor.

Implementation

SvgLine({
  required num x1,
  required num y1,
  required num x2,
  required num y2,
  String? stroke,
  super.className,
  Map<String, String>? attrs,
  super.on,
}) : super('line',
          attrs: _mergeAttrs(attrs, {
            'x1': '$x1',
            'y1': '$y1',
            'x2': '$x2',
            'y2': '$y2',
            if (stroke != null) 'stroke': stroke,
          }));