parseAvdElement function
Creates a Drawable from an SVG
If an unsupported element is encountered, it will be created as a DrawableNoop.
Implementation
Drawable parseAvdElement(XmlElement el, Rect bounds) {
if (el.name.local == 'path') {
return DrawableAvdPath.fromXml(el);
} else if (el.name.local == 'group') {
return parseAvdGroup(el, bounds);
}
// TODO(dnfield): clipPath
print('Unhandled element ${el.name.local}');
return const DrawableGroup('', null, null);
}