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.

27 lines
662 B

  1. import 'package:webfeed/util/xml.dart';
  2. import 'package:xml/xml.dart';
  3. class Scene {
  4. final String? title;
  5. final String? description;
  6. final String? startTime;
  7. final String? endTime;
  8. Scene({
  9. this.title,
  10. this.description,
  11. this.startTime,
  12. this.endTime,
  13. });
  14. static Scene? parse(XmlElement? element) {
  15. if (element == null) return null;
  16. return Scene(
  17. title: findFirstElement(element, 'sceneTitle')?.text,
  18. description: findFirstElement(element, 'sceneDescription')?.text,
  19. startTime: findFirstElement(element, 'sceneStartTime')?.text,
  20. endTime: findFirstElement(element, 'sceneEndTime')?.text,
  21. );
  22. }
  23. }