newFromURL method
Creates a new Podcast from an RSS url.
Gathers information from the XML response and creates handy getters to make it simple to interact with.
Implementation
static Future<Podcast> newFromURL(String uri) async {
if (uri == null) throw Exception("URL cannot be null");
final rssResponse = await http.get(uri);
try {
var document = parse(rssResponse.body);
var show = Podcast();
show.doc = document;
return show;
} catch (e) {
print(
"ERROR: Could not parse response body. Here's the deets: \n${e.message}");
}
return null;
}