getElementStyle method

SVGElementStyle getElementStyle(
  1. Element element
)

Implementation

SVGElementStyle getElementStyle(Element element) {
  var _fillColor = element.attributes['fill']?.toLowerCase();
  var _strokeColor = element.attributes['stroke']?.toLowerCase();
  var _strokeWidth = element.attributes['stroke-width'];

  var fillColor = convertColor(_fillColor);
  var strokeColor = convertColor(_strokeColor);
  var strokeWidth = attributeToDouble(_strokeWidth);

  return SVGElementStyle(
    fillColor: fillColor,
    strokeColor: strokeColor,
    strokeWidth: strokeWidth,
  );
}