Content.fromXml constructor
Content.fromXml(
- XmlElement node, {
- String defaultType = 'xml',
Creates a new Content object from an XmlElement
Implementation
factory Content.fromXml(XmlElement node, {String defaultType = 'xml'}) {
final type = node.getAttribute('mode') ?? node.getAttribute('type') ?? defaultType;
return Content(
value: textDecoder(type, node),
type: type,
src: node.getAttribute('src'),
);
}