fromRss2 method Null safety

WebFeed fromRss2(
  1. RssFeed rssFeed
)

Implementation

static WebFeed fromRss2(RssFeed rssFeed) {
  return WebFeed(
    title: rssFeed.title ?? rssFeed.dc?.title ?? '',
    description: rssFeed.description ?? rssFeed.dc?.description ?? '',
    links: [rssFeed.link],
    items: rssFeed.items
        .map(
          (item) => WebFeedItem(
            title: item.title ?? item.dc?.title ?? '',
            body: item.description ?? item.dc?.description ?? '',
            updated: SafeParseDateTime.safeParse(item.pubDate) ??
                SafeParseDateTime.safeParse(item.dc?.date),
            links: [item.link],
          ),
        )
        .toList(),
  );
}