The Webfeed Flutter package for Appeto SDK.
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

28 righe
542 B

  1. import 'package:xml/xml.dart';
  2. class Player {
  3. final String url;
  4. final int width;
  5. final int height;
  6. final String value;
  7. Player({
  8. this.url,
  9. this.width,
  10. this.height,
  11. this.value,
  12. });
  13. factory Player.parse(XmlElement element) {
  14. if (element == null) {
  15. return null;
  16. }
  17. return new Player(
  18. url: element.getAttribute("url"),
  19. width: int.tryParse(element.getAttribute("width") ?? "0"),
  20. height: int.tryParse(element.getAttribute("height") ?? "0"),
  21. value: element.text,
  22. );
  23. }
  24. }