replaceElement function
void
replaceElement({})
Implementation
void replaceElement({
required XmlElement launchTheme,
required String name,
required String value,
}) {
launchTheme.children.removeWhere(
(element) => element.attributes.any(
(attribute) =>
attribute.name.toString() == 'name' && attribute.value == name,
),
);
launchTheme.children.add(
XmlElement(
XmlName('item'),
[XmlAttribute(XmlName('name'), name)],
[XmlText(value)],
),
);
}