lastElementChild property Null safety

XmlElement? lastElementChild

Return the last child XmlElement, or null if there are none.

Implementation

@override
XmlElement? get lastElementChild {
  for (final node in children.reversed) {
    if (node is XmlElement) {
      return node;
    }
  }
  return null;
}