SvgText constructor

SvgText({
  1. String? text,
  2. num? x,
  3. num? y,
  4. String? fill,
  5. String? className,
  6. Map<String, String>? attrs,
  7. Map<String, BloomEventHandler>? on,
  8. List<BloomNode> children = const [],
})

Creates an SVG <text> element descriptor with x, y, and fill shorthands.

Implementation

SvgText({
  super.text,
  num? x,
  num? y,
  String? fill,
  super.className,
  Map<String, String>? attrs,
  super.on,
  super.children = const [],
}) : super('text',
          attrs: _mergeAttrs(attrs, {
            if (x != null) 'x': '$x',
            if (y != null) 'y': '$y',
            if (fill != null) 'fill': fill,
          }));