parse static method

RssPodcastIndexLiveItemImages? parse(
  1. XmlElement? element
)

Implementation

static RssPodcastIndexLiveItemImages? parse(XmlElement? element) {
  if (element == null) {
    return null;
  }

  final imagesElement = element.getAttribute("srcset");
  if (imagesElement == null) {
    return const RssPodcastIndexLiveItemImages(urls: null);
  }
  final urls = imagesElement.split(",").map((e) => RegExp(r"^[^s]+").firstMatch(e).toString()).toList();
  return RssPodcastIndexLiveItemImages(urls: urls);
}