generate method

SvgWidget generate(
  1. double x,
  2. double y,
  3. Color lineColor,
  4. Color textColor,
  5. double lineLength,
  6. double marginLeftText,
)

Implementation

SvgWidget generate(double x, double y, Color lineColor, Color textColor,
    double lineLength, double marginLeftText) {
  return Group(id: 'legend item', children: [
    Line(x1: x, y1: y, x2: x + lineLength, y2: y, stroke: lineColor),
    Text(
        x: x + lineLength + marginLeftText,
        y: y,
        text: name,
        fill: textColor,
        alignmentY: AlignmentY.central,
        textAnchor: TextAnchor.start)
  ]);
}