RssEnclosure.parse constructor
RssEnclosure.parse(
- XmlElement element
Parse constructor for the RssEnclosure class, used when 'parsing' a feed
Implementation
factory RssEnclosure.parse(XmlElement element) {
final url = element.getAttribute('url');
final type = element.getAttribute('type');
final length = int.tryParse(element.getAttribute('length') ?? '0');
return RssEnclosure(url, type, length);
}