The Webfeed Flutter package for Appeto SDK.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

34 lignes
856 B

  1. import 'package:webfeedclient/util/helpers.dart';
  2. import 'package:xml/xml.dart';
  3. class Item {
  4. final String title;
  5. final String description;
  6. final String link;
  7. final String guid;
  8. final String pubDate;
  9. Item(this.title, this.description, this.link, {this.guid, this.pubDate});
  10. factory Item.parse(XmlElement element) {
  11. var title = xmlGetString(element, "title");
  12. var description = xmlGetString(element, "description");
  13. var link = xmlGetString(element, "link");
  14. var guid = xmlGetString(element, "guid", strict: false);
  15. var pubDate = xmlGetString(element, "pubDate", strict: false);
  16. return new Item(title, description, link, guid: guid, pubDate: pubDate);
  17. }
  18. @override
  19. String toString() {
  20. return '''
  21. title: $title
  22. description: $description
  23. link: $link
  24. pubDate: $pubDate
  25. ''';
  26. }
  27. }