The Webfeed Flutter package for Appeto SDK.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 regels
612 B

  1. import 'package:http/http.dart' as http;
  2. import 'package:webfeed/webfeed.dart';
  3. void main() {
  4. var client = new http.Client();
  5. // RSS feed
  6. client.get("https://developer.apple.com/news/releases/rss/releases.rss").then((response) {
  7. return response.body;
  8. }).then((bodyString) {
  9. var channel = new RssFeed.parse(bodyString);
  10. print(channel);
  11. return channel;
  12. });
  13. // Atom feed
  14. client.get("https://www.theverge.com/rss/index.xml").then((response) {
  15. return response.body;
  16. }).then((bodyString) {
  17. var feed = new AtomFeed.parse(bodyString);
  18. print(feed);
  19. return feed;
  20. });
  21. }