parseAvdGroup function

Drawable parseAvdGroup(
  1. XmlElement el,
  2. Rect bounds
)

Parses an AVD

Implementation

Drawable parseAvdGroup(XmlElement el, Rect bounds) {
  final List<Drawable> children = <Drawable>[];
  for (XmlNode child in el.children) {
    if (child is XmlElement) {
      final Drawable el = parseAvdElement(child, bounds);
      children.add(el);
    }
  }

  final Matrix4 transform = parseTransform(el.attributes);

  final DrawablePaint? fill = parseFill(el.attributes, bounds);
  final DrawablePaint? stroke = parseStroke(el.attributes, bounds);

  return DrawableGroup(
    getAttribute(el.attributes, 'id', def: ''),
    children,
    DrawableStyle(
      stroke: stroke,
      fill: fill,
      groupOpacity: 1.0,
    ),
    transform: transform.storage,
  );
}