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.

19 line
380 B

  1. import 'package:xml/xml.dart';
  2. class Statistics {
  3. final int? views;
  4. final int? favorites;
  5. Statistics({
  6. this.views,
  7. this.favorites,
  8. });
  9. factory Statistics.parse(XmlElement? element) {
  10. return Statistics(
  11. views: int.tryParse(element?.getAttribute('views') ?? '0'),
  12. favorites: int.tryParse(element?.getAttribute('favorites') ?? '0'),
  13. );
  14. }
  15. }