parse static method

Statistics? parse(
  1. XmlElement? element
)

Implementation

static Statistics? parse(XmlElement? element) {
  if (element == null) {
    return null;
  }
  return Statistics(
    views: int.tryParse(element.getAttribute('views') ?? '0') ?? 0,
    favorites: int.tryParse(element.getAttribute('favorites') ?? '0') ?? 0,
  );
}