The Webfeed Flutter package for Appeto SDK.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

25 wiersze
566 B

  1. import 'package:xml/xml.dart';
  2. class StarRating {
  3. final double? average;
  4. final int? count;
  5. final int? min;
  6. final int? max;
  7. StarRating({
  8. this.average,
  9. this.count,
  10. this.min,
  11. this.max,
  12. });
  13. factory StarRating.parse(XmlElement? element) {
  14. return StarRating(
  15. average: double.tryParse(element?.getAttribute('average') ?? '0'),
  16. count: int.tryParse(element?.getAttribute('count') ?? '0'),
  17. min: int.tryParse(element?.getAttribute('min') ?? '0'),
  18. max: int.tryParse(element?.getAttribute('max') ?? '0'),
  19. );
  20. }
  21. }