parse static method

Tags? parse(
  1. XmlElement? element
)

Implementation

static Tags? parse(XmlElement? element) {
  if (element == null) {
    return null;
  }

  return Tags(
    tags: element.innerText,
    weight: int.tryParse(element.getAttribute('weight') ?? '1') ?? 1,
  );
}