Value.parse constructor
Value.parse(
- XmlElement element
Factory method to parse an XmlElement
and create a Value object from it.
The element
is an XML element containing the value information.
Returns the parsed Value object.
Implementation
factory Value.parse(XmlElement element) {
return Value(
type: element.getAttribute('type'),
method: element.getAttribute('method'),
suggested: element.getAttribute('suggested'),
valueRecipients: element
.findElements('podcast:valueRecipient')
.map((e) => ValueRecipient.parse(e))
.toList(),
);
}