copy method Null safety

  1. @override
XmlElement copy()
override

Return a copy of this node and all its children.

Implementation

@override
XmlElement copy() => XmlElement(
    name.copy(),
    attributes.map((each) => each.copy()),
    children.map((each) => each.copy()),
    isSelfClosing);