RssPodcastIndexAlternateEnclosure.parse constructor
RssPodcastIndexAlternateEnclosure.parse(
- XmlElement element
Implementation
factory RssPodcastIndexAlternateEnclosure.parse(XmlElement element) {
return RssPodcastIndexAlternateEnclosure(
title: element.getAttribute('title'),
mimeType: element.getAttribute('type') ?? '',
length: int.tryParse(element.getAttribute('length') ?? ''),
bitRate: int.tryParse(element.getAttribute('bitrate') ?? ''),
height: int.tryParse(element.getAttribute('height') ?? ''),
lang: element.getAttribute('lang'),
rel: element.getAttribute('rel'),
codecs: element.getAttribute('codecs'),
defaultMedia:
bool.tryParse(element.getAttribute('default') ?? '') ?? false,
sources: element.findElements('podcast:source').map((e) {
return RssPodcastAlternateEnclosureSource.parse(e);
}).toList(),
integrity: element.findElements('podcast:integrity').map((e) {
return RssPodcastAlternateEnclosureIntegrity.parse(e);
}).firstOrNull,
);
}