parseBoolLiteral function

bool parseBoolLiteral(
  1. XmlElement element,
  2. String tagName
)

Implementation

bool parseBoolLiteral(XmlElement element, String tagName) {
  var v =
      element.findElements(tagName).firstOrNull?.innerText.toLowerCase().trim();
  if (v == null) return false;
  return ['yes', 'true'].contains(v);
}