parse static method

Player? parse(
  1. XmlElement? element
)

Implementation

static Player? parse(XmlElement? element) {
  if (element == null) {
    return null;
  }
  return Player(
    url: element.getAttribute('url'),
    width: int.tryParse(element.getAttribute('width') ?? '0') ?? 0,
    height: int.tryParse(element.getAttribute('height') ?? '0') ?? 0,
    value: element.text,
  );
}